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 1
1
package com.github.jengelman.gradle.plugins.shadow
2
2
3
3
import assertk.assertThat
4
+ import assertk.assertions.contains
4
5
import assertk.assertions.isEqualTo
5
6
import com.github.jengelman.gradle.plugins.shadow.internal.mainClassAttributeKey
6
7
import com.github.jengelman.gradle.plugins.shadow.util.JvmLang
@@ -117,4 +118,36 @@ class KotlinPluginsTest : BasePluginTest() {
117
118
}
118
119
}
119
120
}
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
+ }
120
153
}
You can’t perform that action at this time.
0 commit comments