Skip to content

Commit 353aa3d

Browse files
committed
Test compatKmpApplicationDsl
1 parent 876267a commit 353aa3d

File tree

1 file changed

+33
-0
lines changed
  • src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow

1 file changed

+33
-0
lines changed

src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/KmpPluginTest.kt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.github.jengelman.gradle.plugins.shadow
22

33
import assertk.assertThat
4+
import assertk.assertions.contains
45
import com.github.jengelman.gradle.plugins.shadow.util.containsEntries
56
import kotlin.io.path.appendText
67
import kotlin.io.path.writeText
@@ -51,4 +52,36 @@ class KmpPluginTest : BasePluginTest() {
5152
)
5253
}
5354
}
55+
56+
@Test
57+
fun compatKmpApplicationDsl() {
58+
writeClass(sourceSet = "jvmMain", isJava = false, withImports = true)
59+
projectScriptPath.appendText(
60+
"""
61+
kotlin {
62+
jvm {
63+
binaries {
64+
executable {
65+
mainClass.set("my.MainKt")
66+
}
67+
}
68+
}
69+
sourceSets {
70+
jvmMain {
71+
dependencies {
72+
implementation 'junit:junit:3.8.2'
73+
}
74+
}
75+
}
76+
}
77+
""".trimIndent(),
78+
)
79+
80+
val result = run(runShadowTask)
81+
82+
assertThat(result.output).contains(
83+
"Hello, World! (foo) from Main",
84+
"Refs: junit.framework.Test",
85+
)
86+
}
5487
}

0 commit comments

Comments
 (0)