feat: maybe gotten it working, i probably don't need a plugin after all

This commit is contained in:
zaaarf 2023-02-26 21:22:58 +01:00
parent 96b2bc5536
commit 08e55d42f4
No known key found for this signature in database
GPG key ID: 82240E075E31FA4C
7 changed files with 6 additions and 25 deletions

View file

@ -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"
}
}
}

View file

@ -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();

View file

@ -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) {
}
}

View file

@ -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 {}

View file

@ -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 {
/**

View file

@ -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 {}

View file

@ -0,0 +1 @@
ftbsc.lll.LilleroProcessor,isolating