summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle11
-rw-r--r--src/main/java/ftbsc/lll/processor/LilleroProcessor.java2
-rw-r--r--src/main/java/ftbsc/lll/processor/Main.java11
-rw-r--r--src/main/java/ftbsc/lll/processor/annotations/Injector.java2
-rw-r--r--src/main/java/ftbsc/lll/processor/annotations/Patch.java2
-rw-r--r--src/main/java/ftbsc/lll/processor/annotations/Target.java2
-rw-r--r--src/main/resources/META-INF/gradle/incremental.annotation.processors1
7 files changed, 6 insertions, 25 deletions
diff --git a/build.gradle b/build.gradle
index 24865be..2306529 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,5 @@
plugins {
- id 'java-gradle-plugin'
+ id 'java'
}
group 'ftbsc.lll.processor'
@@ -13,13 +13,4 @@ dependencies {
implementation 'com.squareup:javapoet:1.13.0'
implementation 'ftbsc:lll:0.2.0'
implementation 'org.ow2.asm:asm-commons:9.4' //just for the javadocs
-}
-
-gradlePlugin {
- plugins {
- create("lillero-processor") {
- id = "ftbsc.lll.processor"
- implementationClass = "ftbsc.lll.processor.Plugin"
- }
- }
} \ No newline at end of file
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<TypeElement> 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<Project> {
- @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 {}
diff --git a/src/main/resources/META-INF/gradle/incremental.annotation.processors b/src/main/resources/META-INF/gradle/incremental.annotation.processors
new file mode 100644
index 0000000..8f9ef31
--- /dev/null
+++ b/src/main/resources/META-INF/gradle/incremental.annotation.processors
@@ -0,0 +1 @@
+ftbsc.lll.LilleroProcessor,isolating \ No newline at end of file