[Gradle] Support Native embeddable compiler jar in subplugins

Apply generic (backend-agnostic) compiler plugin artifact instead of
Native-specific one when Native embeddable compiler jar is used
(with `kotlin.native.useEmbeddableCompilerJar=true` project property).
This commit is contained in:
Svyatoslav Scherbina
2021-08-27 23:01:42 +03:00
committed by Space
parent 0b4dfd58fc
commit 71af22dba0
4 changed files with 38 additions and 1 deletions
@@ -123,6 +123,14 @@ interface KotlinCompilerPluginSupportPlugin : Plugin<Project> {
fun getCompilerPluginId(): String
fun getPluginArtifact(): SubpluginArtifact
/**
* 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.
*/
fun getPluginArtifactForNative(): SubpluginArtifact? = null
}