mirror of
https://github.com/zaaarf/lillero-processor.git
synced 2024-11-22 16:24:53 +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 {
|
plugins {
|
||||||
id 'java-gradle-plugin'
|
id 'java'
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'ftbsc.lll.processor'
|
group 'ftbsc.lll.processor'
|
||||||
|
@ -14,12 +14,3 @@ dependencies {
|
||||||
implementation 'ftbsc:lll:0.2.0'
|
implementation 'ftbsc:lll:0.2.0'
|
||||||
implementation 'org.ow2.asm:asm-commons:9.4' //just for the javadocs
|
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) {
|
private void generateServiceProvider(Set<TypeElement> inj) {
|
||||||
try {
|
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());
|
PrintWriter out = new PrintWriter(serviceProvider.openWriter());
|
||||||
inj.forEach(i -> out.println(i.getQualifiedName() + "Injector"));
|
inj.forEach(i -> out.println(i.getQualifiedName() + "Injector"));
|
||||||
out.close();
|
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 Patch
|
||||||
* @see Target
|
* @see Target
|
||||||
*/
|
*/
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.CLASS)
|
||||||
@java.lang.annotation.Target(ElementType.METHOD)
|
@java.lang.annotation.Target(ElementType.METHOD)
|
||||||
public @interface Injector {}
|
public @interface Injector {}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
* @see Target
|
* @see Target
|
||||||
* @see Injector
|
* @see Injector
|
||||||
*/
|
*/
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.CLASS)
|
||||||
@java.lang.annotation.Target(ElementType.TYPE)
|
@java.lang.annotation.Target(ElementType.TYPE)
|
||||||
public @interface Patch {
|
public @interface Patch {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,6 +13,6 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
* @see Patch
|
* @see Patch
|
||||||
* @see Injector
|
* @see Injector
|
||||||
*/
|
*/
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.CLASS)
|
||||||
@java.lang.annotation.Target(ElementType.METHOD)
|
@java.lang.annotation.Target(ElementType.METHOD)
|
||||||
public @interface Target {}
|
public @interface Target {}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ftbsc.lll.LilleroProcessor,isolating
|
Loading…
Reference in a new issue