Remove 'KotlinGradleSubplugin'

^KT-48831 Fixed
This commit is contained in:
Yahor Berdnikau
2022-02-14 20:26:04 +01:00
committed by Space
parent 85d949a04a
commit 4143df1c8f
14 changed files with 28 additions and 393 deletions
@@ -19,8 +19,6 @@ package org.jetbrains.kotlin.gradle.plugin
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.provider.Provider
import org.gradle.api.tasks.compile.AbstractCompile
import org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
import java.io.File
open class SubpluginOption(val key: String, private val lazyValue: Lazy<String>) {
@@ -75,37 +73,6 @@ open class CompilerPluginConfig {
}
}
// Deprecated because most calls require the tasks to be instantiated, which is not compatible with Gradle task configuration avoidance.
@Deprecated(
message = "This interface will be removed due to performance considerations. " +
"Please use the KotlinCompilerPluginSupportPlugin interface instead " +
"and remove the META-INF/services/org.jetbrains.kotlin.gradle.plugin.KotlinGradleSubplugin entry.",
replaceWith = ReplaceWith("KotlinCompilerPluginSupportPlugin"),
level = DeprecationLevel.ERROR
)
interface KotlinGradleSubplugin<in KotlinCompile : AbstractCompile> {
fun isApplicable(project: Project, task: AbstractCompile): Boolean
fun apply(
project: Project,
kotlinCompile: KotlinCompile,
javaCompile: AbstractCompile?,
variantData: Any?,
androidProjectHandler: Any?,
kotlinCompilation: KotlinCompilation<KotlinCommonOptions>?
): List<SubpluginOption>
fun getSubpluginKotlinTasks(
project: Project,
kotlinCompile: KotlinCompile
): List<AbstractCompile> = emptyList()
fun getCompilerPluginId(): String
fun getPluginArtifact(): SubpluginArtifact
fun getNativeCompilerPluginArtifact(): SubpluginArtifact? = null
}
/**
* Gradle plugin implementing support for a Kotlin compiler plugin.
*