Hey folks, I've hit a strange issue when upgrading my Android project to Gradle 8. I haven't been able to find the root of the issue but somehow it seems like some gradle tasks are using different java versions than other.
Copy code
Execution failed for task ':core:compileDebugKotlin'.
> 'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version.
galvas
07/28/2023, 1:40 PM
Like, even if I add a new toolchain
Copy code
jvmToolchain {
(this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of("11"))
}
I still get
Copy code
'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlin' task (current target is 11)
galvas
07/28/2023, 1:58 PM
Updating this seems to work, but I still need to keep the bytecode compatible with 1.8