[tests] Adjust MppDiagnosticsIt after removing deprecated K/N targets (8/8)
Tests were using deprecated targets to produce ERROR-diagnostics. Replace it with a different diagnostic (CommonMainOrTestWithDependsOnEdges) ^KT-64517
This commit is contained in:
committed by
Space Team
parent
9e8be97fbb
commit
47546ece27
+6
-5
@@ -8,12 +8,13 @@ repositories {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
// Using deprecated target to provoke ERROR-diagnostic. If you came here because you removed
|
||||
// that target entirely, just replace it with any other construction from KGP that provokes
|
||||
// ERROR-diagnostic
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
linuxMips32()
|
||||
linuxX64()
|
||||
mingwX64()
|
||||
|
||||
sourceSets {
|
||||
val myCustomSourceSet by creating
|
||||
commonMain.get().dependsOn(myCustomSourceSet)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.create("myTask") {
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
> Task :checkKotlinGradlePluginConfigurationErrors FAILED
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
> Configure project :
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
|
||||
> Task :checkKotlinGradlePluginConfigurationErrors FAILED
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
> Configure project :
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
> Configure project :
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
> Configure project :
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
kotlin.mpp.applyDefaultHierarchyTemplate=false
|
||||
+7
-5
@@ -3,9 +3,11 @@ plugins {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
// Using deprecated target to provoke ERROR-diagnostic. If you came here because you removed
|
||||
// that target entirely, just replace it with any other construction from KGP that provokes
|
||||
// ERROR-diagnostic
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
linuxMips32()
|
||||
linuxX64()
|
||||
jvm()
|
||||
|
||||
sourceSets {
|
||||
val myCustomSourceSet by creating
|
||||
commonMain.get().dependsOn(myCustomSourceSet)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
> Configure project :
|
||||
|
||||
> Configure project :brokenProjectA
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare de
|
||||
> Configure project :healthyProject
|
||||
|
||||
> Task :brokenProjectA:checkKotlinGradlePluginConfigurationErrors FAILED
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
> Configure project :
|
||||
|
||||
> Configure project :brokenProjectA
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
> Configure project :
|
||||
|
||||
> Configure project :brokenProjectA
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
> Configure project :
|
||||
|
||||
> Configure project :brokenProjectA
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare de
|
||||
> Configure project :healthyProject
|
||||
|
||||
> Task :brokenProjectA:checkKotlinGradlePluginConfigurationErrors FAILED
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
> Configure project :
|
||||
|
||||
> Configure project :brokenProjectA
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare de
|
||||
> Configure project :healthyProject
|
||||
|
||||
> Task :brokenProjectA:checkKotlinGradlePluginConfigurationErrors FAILED
|
||||
e: [DeprecatedKotlinNativeTargetsDiagnostic | ERROR] The following removed Kotlin/Native targets were used in the project: linuxMips32
|
||||
e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare dependsOn on other source sets
|
||||
#diagnostic-end
|
||||
|
||||
+7
-5
@@ -8,11 +8,13 @@ repositories {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
// Using deprecated target to provoke ERROR-diagnostic. If you came here because you removed
|
||||
// that target entirely, just replace it with any other construction from KGP that provokes
|
||||
// ERROR-diagnostic
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
linuxMips32()
|
||||
linuxX64()
|
||||
jvm()
|
||||
|
||||
sourceSets {
|
||||
val myCustomSourceSet by creating
|
||||
commonMain.get().dependsOn(myCustomSourceSet)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.create("myTask") {
|
||||
|
||||
+4
-2
@@ -1,3 +1,5 @@
|
||||
kotlin.internal.suppressGradlePluginErrors=DeprecatedKotlinNativeTargetsDiagnostic
|
||||
kotlin.internal.suppressGradlePluginErrors=CommonMainOrTestWithDependsOnDiagnostic
|
||||
# Check that the warning about internal KGP properties is not suppressible
|
||||
kotlin.suppressGradlePluginWarning=InternalKotlinGradlePluginPropertiesUsed
|
||||
kotlin.suppressGradlePluginWarning=InternalKotlinGradlePluginPropertiesUsed
|
||||
# We use dependsOn to trigger error warning which in turns disables default hierarchy template application and noisy warnings
|
||||
kotlin.mpp.applyDefaultHierarchyTemplate=false
|
||||
|
||||
Reference in New Issue
Block a user