Hello, even I use `kapt{ annotationProcessor("foo....
# kapt
i
Hello, even I use
kapt{ annotationProcessor("foo.bar.Aprocessor") }
. The gradle show me that Can't find annotation processor. Before that, I use
kapt/compileOnly("com.google.auto.service:auto-service:1.0-rc7")
in the processor build file. And use
kapt/compileOnly(project("codegen", "default"))
in the parent project (which use the annotation in fact.) Thank you for your help.
✔️ 1
😫 2
f
Just use kapt("foo.bar.Aprocessor") and you need to apply the plugin https://kotlinlang.org/docs/reference/kapt.html
i
I applied this plugin And:
Copy code
Supplied String module notation 'space.iseki.codegen4vertx.Codegen' is invalid. Example notations: 'org.gradle:gradle-core:2.2', 'org.mockito:mockito-core:1.9.5:ja
vadoc'.
When I use
kapt("space.iseki.codegen4vertx.Codegen")
@Foso
I try to use
compile
compileOnly implementation
... But it not works also. The kapt said it can't find the annotation processor...
f
Where are you getting the dependency from? MavenCentral, JCenter, is it local on your computer?
i
It's child module.
include("codegen")
f
try kapt project(":codegen")
i
Yeah. I have tried.
But it's not working too.
I checked the Meta file. It's correctly. But kapt don't invoke my processor. If I declare it explicit. Kapt/gradle said it's not exists...
f
Don't know if this helps, but in this project, i used an annotation processor from an module https://github.com/Foso/ExtensionGenerator
i
I use it like you exactly.😥 Only difference is I put the
app
as the parent module
Ah. There is another different. My kotlin version is
1.4.0-rc
Thank you for your help.
Problem solved. I'm foolish. I wrote
@AutoService(AbstractProcessor::class)
instead of
@AutoService(Processor::class)
😫
🎉 2