[Gradle] Partially revert "enable to work with embedded k/n compiler"
This partially reverts commit 2baf344f5f,
removing support for K/N embeddable compiler jar from subplugins.
More migration-friendly implementation is to be added instead.
This commit is contained in:
committed by
Space
parent
e766339c81
commit
0fd4884149
-1
@@ -124,7 +124,6 @@ interface KotlinCompilerPluginSupportPlugin : Plugin<Project> {
|
||||
fun getCompilerPluginId(): String
|
||||
fun getPluginArtifact(): SubpluginArtifact
|
||||
fun getPluginArtifactForNative(): SubpluginArtifact? = null
|
||||
fun getPluginArtifactForNative(project: Project): SubpluginArtifact? = getPluginArtifactForNative()
|
||||
}
|
||||
|
||||
open class SubpluginArtifact(val groupId: String, val artifactId: String, val version: String? = null)
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ class SubpluginEnvironment(
|
||||
|
||||
|
||||
if (kotlinCompilation is AbstractKotlinNativeCompilation) {
|
||||
subplugin.getPluginArtifactForNative(project)?.let { artifact ->
|
||||
subplugin.getPluginArtifactForNative()?.let { artifact ->
|
||||
project.addMavenDependency(kotlinCompilation.pluginConfigurationName, artifact)
|
||||
}
|
||||
} else {
|
||||
|
||||
-11
@@ -50,12 +50,6 @@ class SerializationGradleSubplugin :
|
||||
override fun getPluginArtifactForNative(): SubpluginArtifact? =
|
||||
SubpluginArtifact(SERIALIZATION_GROUP_NAME, SERIALIZATION_ARTIFACT_UNSHADED_NAME)
|
||||
|
||||
override fun getPluginArtifactForNative(project: Project): SubpluginArtifact? =
|
||||
if (project.isNativeEmbedded)
|
||||
getPluginArtifact()
|
||||
else getPluginArtifactForNative()
|
||||
|
||||
|
||||
override fun getCompilerPluginId() = "org.jetbrains.kotlinx.serialization"
|
||||
|
||||
//region Stub implementation for legacy API, KT-39809
|
||||
@@ -69,9 +63,4 @@ class SerializationGradleSubplugin :
|
||||
"Please use an older version of kotlin-serialization or upgrade the Kotlin Gradle plugin version to make them match."
|
||||
)
|
||||
//endregion
|
||||
|
||||
// TODO: find better place (see org.jetbrains.kotlin.compilerRunner.KotlinNativeToolRunner.isNativeEmbedded)
|
||||
private val Project.isNativeEmbedded: Boolean
|
||||
get() = findProperty("kotlin.native.shaded")?.toString()?.toBoolean() == true
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user