[Gradle, K/N] Deprecate endorsed libraries
#KT-54177 Fixed
This commit is contained in:
committed by
Space
parent
5924a80ec8
commit
daf14d0931
+1
@@ -164,6 +164,7 @@ abstract class BenchmarkingPlugin: Plugin<Project> {
|
|||||||
kotlin.targetFromPreset(hostPreset, NATIVE_TARGET_NAME) {
|
kotlin.targetFromPreset(hostPreset, NATIVE_TARGET_NAME) {
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
compilations.getByName("main").kotlinOptions.freeCompilerArgs = benchmark.compilerOpts + project.compilerArgs
|
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.getByName("main").enableEndorsedLibs = true
|
||||||
configureNativeOutput(this@configureNativeTarget)
|
configureNativeOutput(this@configureNativeTarget)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -18,6 +18,8 @@ internal class GradleKpmNativeVariantCompilationData(
|
|||||||
override val konanTarget: KonanTarget
|
override val konanTarget: KonanTarget
|
||||||
get() = variant.konanTarget
|
get() = variant.konanTarget
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith")
|
||||||
|
@Deprecated("Declare dependencies explicitly please. This option is scheduled to be removed in 1.9.0")
|
||||||
override val enableEndorsedLibs: Boolean
|
override val enableEndorsedLibs: Boolean
|
||||||
get() = variant.enableEndorsedLibraries
|
get() = variant.enableEndorsedLibraries
|
||||||
|
|
||||||
|
|||||||
+3
@@ -29,6 +29,7 @@ abstract class GradleKpmNativeVariantInternal(
|
|||||||
),
|
),
|
||||||
GradleKpmSingleMavenPublishedModuleHolder by GradleKpmDefaultSingleMavenPublishedModuleHolder(containingModule, fragmentName) {
|
GradleKpmSingleMavenPublishedModuleHolder by GradleKpmDefaultSingleMavenPublishedModuleHolder(containingModule, fragmentName) {
|
||||||
|
|
||||||
|
@Deprecated("Declare dependencies explicitly please. This option is scheduled to be removed in 1.9.0")
|
||||||
override var enableEndorsedLibraries: Boolean = false
|
override var enableEndorsedLibraries: Boolean = false
|
||||||
|
|
||||||
override val gradleVariantNames: Set<String>
|
override val gradleVariantNames: Set<String>
|
||||||
@@ -43,6 +44,8 @@ abstract class GradleKpmNativeVariantInternal(
|
|||||||
|
|
||||||
interface KotlinNativeCompilationData<T : KotlinCommonOptions> : KotlinCompilationData<T> {
|
interface KotlinNativeCompilationData<T : KotlinCommonOptions> : KotlinCompilationData<T> {
|
||||||
val konanTarget: KonanTarget
|
val konanTarget: KonanTarget
|
||||||
|
|
||||||
|
@Deprecated("Declare dependencies explicitly please. This option is scheduled to be removed in 1.9.0")
|
||||||
val enableEndorsedLibs: Boolean
|
val enableEndorsedLibs: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -198,7 +198,8 @@ internal open class KotlinNativeFragmentMetadataCompilationDataImpl(
|
|||||||
?: HostManager.host
|
?: HostManager.host
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME endorsed libs?
|
@Suppress("DeprecatedCallableAddReplaceWith")
|
||||||
|
@Deprecated("Declare dependencies explicitly please. This option is scheduled to be removed in 1.9.0")
|
||||||
override val enableEndorsedLibs: Boolean
|
override val enableEndorsedLibs: Boolean
|
||||||
get() = false
|
get() = false
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -48,6 +48,7 @@ abstract class AbstractKotlinNativeCompilation(
|
|||||||
get() = project.nativeUseEmbeddableCompilerJar
|
get() = project.nativeUseEmbeddableCompilerJar
|
||||||
|
|
||||||
// Endorsed library controller.
|
// Endorsed library controller.
|
||||||
|
@Deprecated("Declare dependencies explicitly please. This option is scheduled to be removed in 1.9.0")
|
||||||
override var enableEndorsedLibs: Boolean = false
|
override var enableEndorsedLibs: Boolean = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -278,7 +278,8 @@ constructor(
|
|||||||
objectFactory.property(it.file(filename).asFile)
|
objectFactory.property(it.file(filename).asFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith")
|
||||||
|
@Deprecated("Declare dependencies explicitly please. This option is scheduled to be removed in 1.9.0")
|
||||||
@get:Input
|
@get:Input
|
||||||
val enableEndorsedLibs: Boolean get() = compilation.enableEndorsedLibs
|
val enableEndorsedLibs: Boolean get() = compilation.enableEndorsedLibs
|
||||||
|
|
||||||
@@ -315,6 +316,8 @@ constructor(
|
|||||||
konanPropertiesService = konanPropertiesService.get()
|
konanPropertiesService = konanPropertiesService.get()
|
||||||
).buildCompilerArgs(resolvedDependencyGraph)
|
).buildCompilerArgs(resolvedDependencyGraph)
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION") val enableEndorsedLibs = this.enableEndorsedLibs // TODO: remove before 1.9.0, see KT-54098
|
||||||
|
|
||||||
val buildArgs = buildKotlinNativeBinaryLinkerArgs(
|
val buildArgs = buildKotlinNativeBinaryLinkerArgs(
|
||||||
output,
|
output,
|
||||||
optimized,
|
optimized,
|
||||||
|
|||||||
+1
@@ -208,6 +208,7 @@ abstract class AbstractKotlinNativeCompile<
|
|||||||
get() = languageSettings.progressiveMode
|
get() = languageSettings.progressiveMode
|
||||||
// endregion.
|
// endregion.
|
||||||
|
|
||||||
|
@Deprecated("Declare dependencies explicitly please. This option is scheduled to be removed in 1.9.0")
|
||||||
@get:Input
|
@get:Input
|
||||||
val enableEndorsedLibs: Boolean by project.provider { compilation.enableEndorsedLibs }
|
val enableEndorsedLibs: Boolean by project.provider { compilation.enableEndorsedLibs }
|
||||||
|
|
||||||
|
|||||||
+3
@@ -63,6 +63,7 @@ open class KotlinNativeLinkArtifactTask @Inject constructor(
|
|||||||
@get:Input
|
@get:Input
|
||||||
var debuggable: Boolean = true
|
var debuggable: Boolean = true
|
||||||
|
|
||||||
|
@Deprecated("Declare dependencies explicitly please. This option is scheduled to be removed in 1.9.0")
|
||||||
@get:Input
|
@get:Input
|
||||||
var enableEndorsedLibs: Boolean = false
|
var enableEndorsedLibs: Boolean = false
|
||||||
|
|
||||||
@@ -202,6 +203,8 @@ open class KotlinNativeLinkArtifactTask @Inject constructor(
|
|||||||
|
|
||||||
val localBinaryOptions = nativeBinaryOptions + binaryOptions
|
val localBinaryOptions = nativeBinaryOptions + binaryOptions
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION") val enableEndorsedLibs = this.enableEndorsedLibs // TODO: remove before 1.9.0, see KT-54098
|
||||||
|
|
||||||
val buildArgs = buildKotlinNativeBinaryLinkerArgs(
|
val buildArgs = buildKotlinNativeBinaryLinkerArgs(
|
||||||
outFile = outFile,
|
outFile = outFile,
|
||||||
optimized = optimized,
|
optimized = optimized,
|
||||||
|
|||||||
Reference in New Issue
Block a user