mirror of
https://github.com/zaaarf/lillero-processor.git
synced 2024-11-13 02:39:22 +01:00
feat: maybe gotten it working, i probably don't need a plugin after all
This commit is contained in:
parent
96b2bc5536
commit
08e55d42f4
7 changed files with 6 additions and 25 deletions
11
build.gradle
11
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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
|
|
|
@ -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) {
|
||||
|
||||
}
|
||||
}
|
|
@ -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 {}
|
||||
|
|
|
@ -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 {
|
||||
/**
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
ftbsc.lll.LilleroProcessor,isolating
|
Loading…
Reference in a new issue