Skip to content

Commit 3c71653

Browse files
committed
Don't combine java plugin with kmp plugin
1 parent 32d9edf commit 3c71653

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ abstract class BasePluginTest {
103103
val outputServerShadowJar: JarPath get() = jarPath("server/build/libs/server-1.0-all.jar")
104104

105105
fun getDefaultProjectBuildScript(
106-
javaPlugin: String = "java",
106+
plugin: String = "java",
107107
withGroup: Boolean = false,
108108
withVersion: Boolean = false,
109109
): String {
110110
val groupInfo = if (withGroup) "group = 'my'" else ""
111111
val versionInfo = if (withVersion) "version = '1.0'" else ""
112112
return """
113113
plugins {
114-
id('$javaPlugin')
114+
id('$plugin')
115115
id('com.gradleup.shadow')
116116
}
117117
$groupInfo

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,26 @@ package com.github.jengelman.gradle.plugins.shadow
33
import assertk.assertThat
44
import com.github.jengelman.gradle.plugins.shadow.util.containsEntries
55
import kotlin.io.path.appendText
6+
import kotlin.io.path.writeText
7+
import org.junit.jupiter.api.BeforeEach
68
import org.junit.jupiter.api.Test
79

810
class KmpPluginTest : BasePluginTest() {
11+
@BeforeEach
12+
override fun setup() {
13+
super.setup()
14+
val projectBuildScript = getDefaultProjectBuildScript(
15+
plugin = "org.jetbrains.kotlin.multiplatform",
16+
withGroup = true,
17+
withVersion = true,
18+
)
19+
projectScriptPath.writeText(projectBuildScript)
20+
}
21+
922
@Test
1023
fun compatKmpJvmTarget() {
1124
projectScriptPath.appendText(
1225
"""
13-
apply plugin: 'org.jetbrains.kotlin.multiplatform'
1426
kotlin {
1527
jvm()
1628
sourceSets {

0 commit comments

Comments
 (0)