Open rasmusohrstig opened 4 years ago
I was able to solve this myself.
The problem seems to happen when you import the library in one Kotlin module and then import code from that module in another module.
The solution seems to be to import the library like this in the first module:
annotationProcessor "io.sundr:builder-annotations:0.13.1"
annotationProcessor "io.sundr:resourcecify-annotations:0.13.1"
implementation ("io.fabric8:mockwebserver:0.1.7") {
exclude group: 'io.sundr', module: 'sundr-codegen'
}
I'm trying to import the library in Android studio using Gradle like so:
When building the code I get the following error:
Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration.
I have tried this:
and this:
but it results in duplicate imports of various classes.
The deprecated workaround android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true no longer works now.
What is the best way to import this library in Android Studio?