Hi, I'm trying to migrate to use the multiplatform...
# multiplatform
b
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:
Copy code
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:
Copy code
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:
Copy code
val compileTaskProvider: TaskProvider<out KotlinCompilationTask<*>>
I've managed to bypass it this way
Copy code
compileTaskProvider.configure {
    (this as KotlinJvmCompile).compilerOptions.jvmTarget.set(JVM_TARGET)
}
but it still feels fishy
t