[Gradle] Cover KT-50598 by tests
This commit is contained in:
committed by
Space
parent
a20fbf867f
commit
3d45bcf08d
+14
-2
@@ -38,15 +38,21 @@ class DifferentClassloadersIT : KGPBaseTest() {
|
|||||||
buildAndFail("publish", "-PmppProjectDependency=true") {
|
buildAndFail("publish", "-PmppProjectDependency=true") {
|
||||||
assertOutputContains(MULTIPLE_KOTLIN_PLUGINS_LOADED_WARNING)
|
assertOutputContains(MULTIPLE_KOTLIN_PLUGINS_LOADED_WARNING)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check that the message is also printed on subsequent builds
|
||||||
|
buildAndFail("publish", "-PmppProjectDependency=true") {
|
||||||
|
assertOutputContains(MULTIPLE_KOTLIN_PLUGINS_LOADED_WARNING)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@DisplayName("KT-50598: Different classloaders message is only displayed on the first build")
|
@DisplayName("KT-50598: Different classloaders message can be disabled")
|
||||||
@GradleTest
|
@GradleTest
|
||||||
fun differentClassloadersOnlyFirstBuild(gradleVersion: GradleVersion) {
|
fun differentClassloadersWarningCanBeDisabled(gradleVersion: GradleVersion) {
|
||||||
project("differentClassloaders", gradleVersion) {
|
project("differentClassloaders", gradleVersion) {
|
||||||
setupDifferentClassloadersProject()
|
setupDifferentClassloadersProject()
|
||||||
|
|
||||||
|
fun checkThatWarningIsShown() {
|
||||||
build("-PmppProjectDependency=true") {
|
build("-PmppProjectDependency=true") {
|
||||||
assertOutputContains(MULTIPLE_KOTLIN_PLUGINS_LOADED_WARNING)
|
assertOutputContains(MULTIPLE_KOTLIN_PLUGINS_LOADED_WARNING)
|
||||||
|
|
||||||
@@ -55,6 +61,12 @@ class DifferentClassloadersIT : KGPBaseTest() {
|
|||||||
|
|
||||||
assertEquals(setOf(":mpp-lib", ":jvm-app", ":js-app"), specificProjectsReported)
|
assertEquals(setOf(":mpp-lib", ":jvm-app", ":js-app"), specificProjectsReported)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
checkThatWarningIsShown()
|
||||||
|
|
||||||
|
// check that the message is also printed on subsequent builds
|
||||||
|
checkThatWarningIsShown()
|
||||||
|
|
||||||
// Test the flag that turns off the warnings
|
// Test the flag that turns off the warnings
|
||||||
build("-PmppProjectDependency=true", "-Pkotlin.pluginLoadedInMultipleProjects.ignore=true") {
|
build("-PmppProjectDependency=true", "-Pkotlin.pluginLoadedInMultipleProjects.ignore=true") {
|
||||||
|
|||||||
Reference in New Issue
Block a user