Annotation Processor support for Kapt in Android
See original GitHub issueI would like to know what is the correct procedure to enable Annotation Processor for Immutables. I have been trying to set up it up in one of my Android projects but have been unsuccessful. I’m trying the following code in my module level Gradle file:
android {
defaultConfig {
kapt {
arguments {
arg("-Aimmutables.gradle.incremental", "true")
}
}
}
dependencies {
kapt "org.immutables:value:2.8.8"
compileOnly "org.immutables:value:2.8.8”
compileOnly "org.immutables:gson:2.8.8"
}
When I build my project I get the following warnings:
warning: The following options were not recognized by any processor: '[-Aimmutables.gradle.incremental, kapt.kotlin.generated]'
[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: org.immutables.processor.ProxyProcessor (DYNAMIC).
What am I missing?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
What is Android kapt and its usage? What's the difference ...
"Kapt is the Kotlin Annotation Processing Tool" you need this, to generate annotated code in compile time you can see more info in...
Read more >Annotation Processing with Kapt and Gradle - Mark Dappollone
If you're coming from java, you might be familiar with debugging an annotation processor by running javac from the command line and then...
Read more >A look into Kotlin KAPT for Android — Code-In Mobile
The answer is, KAPT is the official tool for doing annotation processing in Kotlin, thus the answer is always. This is as long...
Read more >KSP: Fact or kapt?. Fast and ergonomic annotation…
While we already have annotation processors in Kotlin through kapt, the new KSP API provides promises speed and ergonomics.
Read more >kapt: Annotation Processing for Kotlin - The JetBrains Blog
We are planning to release the initial support for JSR 269 Annotation Processing in M12, which is planned for the end of May....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t know syntax there (there are just too many ways to do the same, yet who knows which works) On #804 it was suggested something like this
Also something like this discussed here https://github.com/google/dagger/issues/1120#issuecomment-493512366
kapt.incremental.apt=true
seems to be the default, so setting it ingradle.properties
might have no difference@elucash I’m not sure, I can’t find anything else that is required to be included. Also found this issue (#8128) which appears to be linked to warnings - perhaps the warnings are just redundant?