From 08e55d42f42a55d1d5e9fc73e0e2cc463380a402 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sun, 26 Feb 2023 21:22:58 +0100 Subject: feat: maybe gotten it working, i probably don't need a plugin after all --- src/main/java/ftbsc/lll/processor/LilleroProcessor.java | 2 +- src/main/java/ftbsc/lll/processor/Main.java | 11 ----------- src/main/java/ftbsc/lll/processor/annotations/Injector.java | 2 +- src/main/java/ftbsc/lll/processor/annotations/Patch.java | 2 +- src/main/java/ftbsc/lll/processor/annotations/Target.java | 2 +- 5 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 src/main/java/ftbsc/lll/processor/Main.java (limited to 'src/main/java/ftbsc/lll') diff --git a/src/main/java/ftbsc/lll/processor/LilleroProcessor.java b/src/main/java/ftbsc/lll/processor/LilleroProcessor.java index 1839183..1b2cd63 100644 --- a/src/main/java/ftbsc/lll/processor/LilleroProcessor.java +++ b/src/main/java/ftbsc/lll/processor/LilleroProcessor.java @@ -279,7 +279,7 @@ public class LilleroProcessor extends AbstractProcessor { */ private void generateServiceProvider(Set inj) { try { - FileObject serviceProvider = processingEnv.getFiler().createResource(StandardLocation.SOURCE_OUTPUT, "", "ftbsc.lll.IInjector"); + FileObject serviceProvider = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", "ftbsc.lll.IInjector"); PrintWriter out = new PrintWriter(serviceProvider.openWriter()); inj.forEach(i -> out.println(i.getQualifiedName() + "Injector")); out.close(); diff --git a/src/main/java/ftbsc/lll/processor/Main.java b/src/main/java/ftbsc/lll/processor/Main.java deleted file mode 100644 index 54de47b..0000000 --- a/src/main/java/ftbsc/lll/processor/Main.java +++ /dev/null @@ -1,11 +0,0 @@ -package ftbsc.lll.processor; - -import org.gradle.api.Plugin; -import org.gradle.api.Project; - -public class Main implements Plugin { - @Override - public void apply(Project project) { - - } -} diff --git a/src/main/java/ftbsc/lll/processor/annotations/Injector.java b/src/main/java/ftbsc/lll/processor/annotations/Injector.java index 32c91c3..df523ac 100644 --- a/src/main/java/ftbsc/lll/processor/annotations/Injector.java +++ b/src/main/java/ftbsc/lll/processor/annotations/Injector.java @@ -16,6 +16,6 @@ import org.objectweb.asm.tree.MethodNode; * @see Patch * @see Target */ -@Retention(RetentionPolicy.SOURCE) +@Retention(RetentionPolicy.CLASS) @java.lang.annotation.Target(ElementType.METHOD) public @interface Injector {} diff --git a/src/main/java/ftbsc/lll/processor/annotations/Patch.java b/src/main/java/ftbsc/lll/processor/annotations/Patch.java index 9b0f5da..80416ae 100644 --- a/src/main/java/ftbsc/lll/processor/annotations/Patch.java +++ b/src/main/java/ftbsc/lll/processor/annotations/Patch.java @@ -11,7 +11,7 @@ import java.lang.annotation.RetentionPolicy; * @see Target * @see Injector */ -@Retention(RetentionPolicy.SOURCE) +@Retention(RetentionPolicy.CLASS) @java.lang.annotation.Target(ElementType.TYPE) public @interface Patch { /** diff --git a/src/main/java/ftbsc/lll/processor/annotations/Target.java b/src/main/java/ftbsc/lll/processor/annotations/Target.java index 14b4e7c..3a1d209 100644 --- a/src/main/java/ftbsc/lll/processor/annotations/Target.java +++ b/src/main/java/ftbsc/lll/processor/annotations/Target.java @@ -13,6 +13,6 @@ import java.lang.annotation.RetentionPolicy; * @see Patch * @see Injector */ -@Retention(RetentionPolicy.SOURCE) +@Retention(RetentionPolicy.CLASS) @java.lang.annotation.Target(ElementType.METHOD) public @interface Target {} -- cgit v1.2.3-56-ga3b1