Hi, I'm trying to migrate to use the multiplatform version of the Android Library plugin, and have encountered an issue with configuring the JVM version. At the first attempt I've configured it this way:
androidLibrary {
compilations.configureEach {
compilerOptions.configure {
jvmTarget.set(JVM_TARGET)
}
}
}
but then I've received a deprecation message that I should use
compileTaskProvider
instead. But the issue is that when I migrate to it:
androidLibrary {
compilations.configureEach {
compileTaskProvider.configure {
compilerOptions {
jvmTarget.set(JVM_TARGET)
}
}
}
}
the
jvmTarget
is unresolved in here. Has anyone found a solution for this? I'm using Kotlin version
2.1.20
. My opinion is that the root cause of that is because the type of
compileTaskProvider
is too ambigous:
val compileTaskProvider: TaskProvider<out KotlinCompilationTask<*>>