diff --git a/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCompile.kt b/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCompile.kt index 12db6f8da8c6b..0037a7626bb4d 100644 --- a/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCompile.kt +++ b/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCompile.kt @@ -22,6 +22,9 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask * * @see [KotlinCommonOptions] */ +@Deprecated( + message = "Replaced with 'KotlinCompilationTask' that exposes the compiler options DSL. More details are here: https://kotl.in/u1r8ln" +) @KotlinGradlePluginDsl interface KotlinCompile : Task { diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCompile.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCompile.kt index 8454e83c99d1f..1487528c42cd3 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCompile.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/dsl/KotlinCompile.kt @@ -20,9 +20,12 @@ import groovy.lang.Closure import org.gradle.api.Task import org.gradle.api.tasks.Input import org.gradle.api.tasks.Internal +import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile as KotlinJvmCompileApi -interface KotlinJsCompile : KotlinCompile +@Suppress("DEPRECATION") +interface KotlinJsCompile : KotlinCompile, + KotlinCompilationTask @Deprecated( message = "Moved into API artifact", @@ -30,7 +33,13 @@ interface KotlinJsCompile : KotlinCompile ) interface KotlinJvmCompile : KotlinJvmCompileApi -interface KotlinCommonCompile : KotlinCompile +@Suppress("DEPRECATION") +internal interface KotlinNativeCompileTask : KotlinCompile, + KotlinCompilationTask + +@Suppress("DEPRECATION") +interface KotlinCommonCompile : KotlinCompile, + KotlinCompilationTask interface KotlinJsDce : Task { @get:Internal diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeTasks.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeTasks.kt index dda1a9a0be465..ae081a80a1bb5 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeTasks.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeTasks.kt @@ -6,7 +6,6 @@ @file:Suppress("PackageDirectoryMismatch") // Old package for compatibility package org.jetbrains.kotlin.gradle.tasks -import org.gradle.api.Action import org.gradle.api.DefaultTask import org.gradle.api.Project import org.gradle.api.artifacts.* @@ -28,7 +27,6 @@ import org.jetbrains.kotlin.cli.common.arguments.* import org.jetbrains.kotlin.compilerRunner.* import org.jetbrains.kotlin.compilerRunner.KotlinNativeCInteropRunner.Companion.run import org.jetbrains.kotlin.gradle.dsl.* -import org.jetbrains.kotlin.gradle.dsl.KotlinCompile import org.jetbrains.kotlin.gradle.internal.ensureParentDirsCreated import org.jetbrains.kotlin.gradle.internal.isInIdeaSync import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation @@ -277,13 +275,12 @@ internal constructor( final override val compilation: KotlinCompilationInfo, override val compilerOptions: KotlinNativeCompilerOptions, private val objectFactory: ObjectFactory, - private val providerFactory: ProviderFactory, + providerFactory: ProviderFactory, private val execOperations: ExecOperations, ) : AbstractKotlinNativeCompile(objectFactory), - KotlinCompile, + KotlinNativeCompileTask, K2MultiplatformCompilationTask, UsesBuildMetricsService, - KotlinCompilationTask, UsesBuildFusService, UsesKotlinNativeBundleBuildService { diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/K2MultiplatformCompilationTask.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/K2MultiplatformCompilationTask.kt index 88b8f2001f10e..bb7cc202ad73b 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/K2MultiplatformCompilationTask.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/K2MultiplatformCompilationTask.kt @@ -8,7 +8,6 @@ package org.jetbrains.kotlin.gradle.tasks import org.gradle.api.Task import org.gradle.api.tasks.Nested import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions -import org.jetbrains.kotlin.gradle.dsl.KotlinCompile /** * Analogous to [KotlinCompilationTask] for K2 diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/Kotlin2JsCompile.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/Kotlin2JsCompile.kt index 2b97194292598..f53fab29dd5ad 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/Kotlin2JsCompile.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/Kotlin2JsCompile.kt @@ -50,7 +50,6 @@ abstract class Kotlin2JsCompile @Inject constructor( objectFactory: ObjectFactory, workerExecutor: WorkerExecutor, ) : AbstractKotlinCompile(objectFactory, workerExecutor), - KotlinCompilationTask, UsesLibraryFilterCachingService, UsesBuildFusService, KotlinJsCompile, diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/KotlinCompileCommon.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/KotlinCompileCommon.kt index 6251ffea2ce52..adb19fee09944 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/KotlinCompileCommon.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/KotlinCompileCommon.kt @@ -44,7 +44,6 @@ abstract class KotlinCompileCommon @Inject constructor( workerExecutor: WorkerExecutor, objectFactory: ObjectFactory ) : AbstractKotlinCompile(objectFactory, workerExecutor), - KotlinCompilationTask, KotlinCommonCompile { init {