[Gradle] Lower deprecation level of KotlinCompilation source method
It makes IDE Import failing when method is used. So tooling diagnostic with ERROR level is preferred in such cases. ^KT-58234 Verification Pending
This commit is contained in:
committed by
Space Team
parent
c3b09e148b
commit
f05856f6a0
+1
-1
@@ -131,7 +131,7 @@ interface KotlinCompilation<out T : KotlinCommonOptionsDeprecated> : Named,
|
||||
* Further details:
|
||||
* https://kotl.in/compilation-source-deprecation
|
||||
*/
|
||||
@Deprecated("scheduled for removal with Kotlin 2.0", level = DeprecationLevel.ERROR)
|
||||
@Deprecated("scheduled for removal with Kotlin 2.0")
|
||||
fun source(sourceSet: KotlinSourceSet)
|
||||
|
||||
fun associateWith(other: KotlinCompilation<*>)
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ internal class KotlinCompilationImpl constructor(
|
||||
override val kotlinSourceSets: ObservableSet<KotlinSourceSet>
|
||||
get() = sourceSets.kotlinSourceSets
|
||||
|
||||
@Deprecated("scheduled for removal with Kotlin 2.0", level = DeprecationLevel.ERROR)
|
||||
@Deprecated("scheduled for removal with Kotlin 2.0")
|
||||
override fun source(sourceSet: KotlinSourceSet) {
|
||||
project.kotlinToolingDiagnosticsCollector.report(project, KotlinCompilationSourceDeprecation(Throwable()))
|
||||
sourceSets.source(sourceSet)
|
||||
|
||||
+1
-1
@@ -217,7 +217,7 @@ class SourceSetCommonizerTargetTest {
|
||||
val nativeMain = kotlin.sourceSets.create("nativeMain")
|
||||
|
||||
listOf(linux1, linux2).forEach { target ->
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
@Suppress("DEPRECATION")
|
||||
target.compilations.getByName("main").source(nativeMain)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ class MppDiagnosticsFunctionalTest {
|
||||
checkDiagnosticsWithMppProject("kotlinCompilationSourceDeprecation") {
|
||||
kotlin {
|
||||
val customMain = sourceSets.create("customMain")
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
@Suppress("DEPRECATION")
|
||||
jvm().compilations.create("custom").source(customMain)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user