[Gradle] skip CheckKotlinGradlePluginConfigurationErrors if no errors
- Add an `onlyIf {}` check so CheckKotlinGradlePluginConfigurationErrors
won't run unless there are errors,
which helps writing integration tests and preventing IJ warnings.
- remove unnecessary sequence when fetching DiagnosticsForProject
- update test assertions relating to
CheckKotlinGradlePluginConfigurationErrors
^KT-61943 Fixed
This commit is contained in:
committed by
Space Team
parent
19283048a8
commit
4b48f15d0f
+9
@@ -193,6 +193,15 @@ class MppDiagnosticsIt : KGPBaseTest() {
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
fun testErrorDiagnosticUpToDateIfNoErrors(gradleVersion: GradleVersion) {
|
||||
project("errorDiagnosticUpToDateIfNoErrors", gradleVersion) {
|
||||
build("assemble") {
|
||||
assertTasksSkipped(":checkKotlinGradlePluginConfigurationErrors")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun TestProject.expectedOutputFile(suffix: String? = null): File {
|
||||
val suffixIfAny = if (suffix != null) "-$suffix" else ""
|
||||
return projectPath.resolve("expectedOutput$suffixIfAny.txt").toFile()
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "diagnostics-rendering-smoke"
|
||||
+1
-1
@@ -12,4 +12,4 @@ e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare de
|
||||
|
||||
> Configure project :healthyProject
|
||||
|
||||
> Task :healthyProject:checkKotlinGradlePluginConfigurationErrors
|
||||
> Task :healthyProject:checkKotlinGradlePluginConfigurationErrors SKIPPED
|
||||
|
||||
+1
-1
@@ -22,4 +22,4 @@ e: [CommonMainOrTestWithDependsOnDiagnostic | ERROR] commonMain can't declare de
|
||||
#diagnostic-end
|
||||
|
||||
|
||||
> Task :healthyProject:checkKotlinGradlePluginConfigurationErrors
|
||||
> Task :healthyProject:checkKotlinGradlePluginConfigurationErrors SKIPPED
|
||||
|
||||
+1
-1
@@ -8,4 +8,4 @@ Stability and future compatibility of the build is not guaranteed.
|
||||
#diagnostic-end
|
||||
|
||||
|
||||
> Task :checkKotlinGradlePluginConfigurationErrors
|
||||
> Task :checkKotlinGradlePluginConfigurationErrors SKIPPED
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
> Configure project :
|
||||
|
||||
> Task :checkKotlinGradlePluginConfigurationErrors
|
||||
> Task :checkKotlinGradlePluginConfigurationErrors SKIPPED
|
||||
|
||||
Reference in New Issue
Block a user