Closed
Description
openedon Dec 19, 2020
Seems like something is wrong with how classpaths are set for android apps (couldn't repro w/ jvm sample but that might be my mistake).
See the attached project where I have an android module and a ksp processor module.
The KSP processor checks for the availability of the javax.annotation.processing.Generated
class and adds that annotation if available.
Unfortunately, KSP does return that class even though it is not available to the app, causing compilation failure.
Make sure to compile the attached project with a JDK where that class is available. (I'm using J11). I'm guessing it is why the class shows up.
I tried adding the following line to the app module but didn't help:
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile.class).configureEach {
it.kotlinOptions.jvmTarget = "1.8"
}
Activity