Skip to content

Commit 579f1d3

Browse files
committed
Fix merge
1 parent ab5ffc3 commit 579f1d3

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/KotlinPluginsTest.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 assertk.assertions.isEqualTo
56
import com.github.jengelman.gradle.plugins.shadow.internal.mainClassAttributeKey
67
import com.github.jengelman.gradle.plugins.shadow.util.JvmLang
@@ -117,4 +118,36 @@ class KotlinPluginsTest : BasePluginTest() {
117118
}
118119
}
119120
}
121+
122+
@Test
123+
fun compatKmpApplicationDsl() {
124+
writeClass(sourceSet = "jvmMain", withImports = true, jvmLang = JvmLang.Kotlin)
125+
projectScriptPath.appendText(
126+
"""
127+
kotlin {
128+
jvm {
129+
binaries {
130+
executable {
131+
mainClass.set("my.MainKt")
132+
}
133+
}
134+
}
135+
sourceSets {
136+
jvmMain {
137+
dependencies {
138+
implementation 'junit:junit:3.8.2'
139+
}
140+
}
141+
}
142+
}
143+
""".trimIndent(),
144+
)
145+
146+
val result = run(runShadowTask)
147+
148+
assertThat(result.output).contains(
149+
"Hello, World! (foo) from Main",
150+
"Refs: junit.framework.Test",
151+
)
152+
}
120153
}

0 commit comments

Comments
 (0)