Problem
I couldn't find any documentation on how to write and apply your own Refaster rules. I've tried adding and enabling your Refaster rule compiler to the build like this:
dependencies {
annotationProcessor("tech.picnic.error-prone-support:refaster-compiler:$errorProneSupportVersion")
// ...
}
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.add("-Xplugin:RefasterRuleCompiler")
// ...
}
Then I get my regular Java classes with @BeforeTemplate and @AfterTemplate compiled into .refaster files inside build/classes.
Unfortunately, even though I have the Refaster runner dependency as well, I cannot see any of my custom rules kicking in. I get all the error-prone-support checks tough.
Am I missing something here?
Problem
I couldn't find any documentation on how to write and apply your own Refaster rules. I've tried adding and enabling your Refaster rule compiler to the build like this:
dependencies { annotationProcessor("tech.picnic.error-prone-support:refaster-compiler:$errorProneSupportVersion") // ... }Then I get my regular Java classes with
@BeforeTemplateand@AfterTemplatecompiled into.refasterfiles insidebuild/classes.Unfortunately, even though I have the Refaster runner dependency as well, I cannot see any of my custom rules kicking in. I get all the error-prone-support checks tough.
Am I missing something here?