[MPP] Fix warning reports for subprojects
Properly report warnings for projects that don't apply multiplatform plugin in the root project, but declare the obsolete properties KT-55891
This commit is contained in:
committed by
Space Team
parent
b0c360b1b6
commit
a03db78ed2
+5
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.gradle.mpp
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.gradle.testbase.*
|
||||
import kotlin.io.path.appendText
|
||||
import kotlin.io.path.writeText
|
||||
import kotlin.test.assertFalse
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
@@ -27,6 +28,10 @@ class MppDeprecatedPropertiesIt : KGPBaseTest() {
|
||||
)
|
||||
checkDeprecations(isDeprecationExpected = true)
|
||||
|
||||
// remove the MPP plugin from the top-level project and check the warnings are still reported in subproject
|
||||
this.buildGradleKts.writeText("")
|
||||
checkDeprecations(isDeprecationExpected = true)
|
||||
|
||||
this.gradleProperties.appendText("kotlin.mpp.deprecatedProperties.nowarn=true${System.lineSeparator()}")
|
||||
checkDeprecations(isDeprecationExpected = false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user