File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 11package com.github.jengelman.gradle.plugins.shadow
22
33import assertk.assertThat
4+ import assertk.assertions.contains
45import assertk.assertions.isEqualTo
56import com.github.jengelman.gradle.plugins.shadow.internal.mainClassAttributeKey
67import 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}
You can’t perform that action at this time.
0 commit comments