[Gradle, K/N] Stop using enableEndorsedLibs Gradle flag, make it Error

#KT-54098 Fixed
This commit is contained in:
Alexander.Likhachev
2023-01-25 23:27:47 +01:00
committed by Space Team
parent 3b75658113
commit 67c4dc3cce
15 changed files with 66 additions and 79 deletions
@@ -162,10 +162,13 @@ abstract class BenchmarkingPlugin: Plugin<Project> {
protected fun Project.configureNativeTarget(hostPreset: AbstractKotlinNativeTargetPreset<*>) {
kotlin.targetFromPreset(hostPreset, NATIVE_TARGET_NAME) {
@Suppress("DEPRECATION")
compilations.getByName("main").kotlinOptions.freeCompilerArgs = benchmark.compilerOpts + project.compilerArgs
@Suppress("DEPRECATION") // enableEndorsedLibs is scheduled to be removed in 1.9.0, see KT-54098
compilations.getByName("main").enableEndorsedLibs = true
compilations.named("main").configure {
@Suppress("DEPRECATION")
kotlinOptions.freeCompilerArgs = benchmark.compilerOpts + project.compilerArgs
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.5")
}
}
configureNativeOutput(this@configureNativeTarget)
}
}