[Gradle, Native] Enable embeddable compiler jar by default

For Kotlin/Native compilations, apply generic (backend-agnostic)
compiler plugin artifacts instead of Native-specific ones by default.

`kotlin.native.useEmbeddableCompilerJar=false` project property allows
switching to the previous legacy behaviour. This flag will be removed
in a future release.

^KT-48595 Fixed
This commit is contained in:
Svyatoslav Scherbina
2022-02-11 12:28:41 +03:00
committed by Space
parent 0c6421d53f
commit d0a26d1d85
5 changed files with 60 additions and 32 deletions
@@ -136,11 +136,12 @@ interface KotlinCompilerPluginSupportPlugin : Plugin<Project> {
fun getPluginArtifact(): SubpluginArtifact
/**
* Kotlin/Native-specific plugin artifact.
* Legacy Kotlin/Native-specific plugin artifact.
*
* If Gradle is configured to use Kotlin/Native embeddable compiler jar
* (with `kotlin.native.useEmbeddableCompilerJar=true` project property),
* then [getPluginArtifact] is used instead.
* It is used only if Gradle is configured not to use Kotlin/Native embeddable compiler jar
* (with `kotlin.native.useEmbeddableCompilerJar=false` project property).
*
* Otherwise, [getPluginArtifact] is used by default.
*/
fun getPluginArtifactForNative(): SubpluginArtifact? = null
}