[Gradle] add a reproducer project for KT-52172

Cherry Picked from: https://github.com/JetBrains/kotlin/pull/5045
This commit is contained in:
Martin Bonnin
2022-12-09 16:59:36 +01:00
committed by Space Team
parent b706e05e65
commit 240983bca4
10 changed files with 86 additions and 0 deletions
@@ -0,0 +1,28 @@
plugins {
id("org.jetbrains.kotlin.multiplatform").version("1.7.21")
}
repositories {
mavenCentral()
}
kotlin {
jvm()
js(IR) {
nodejs()
}
sourceSets {
val commonMain by getting {
dependencies {
implementation("included-build:included")
}
}
val commonTest by getting {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-test")
}
}
}
}
@@ -0,0 +1,7 @@
plugins {
id("org.jetbrains.kotlin.multiplatform").version("1.7.21").apply(false)
}
group = "included-build"
version = "0.0.1"
@@ -0,0 +1,10 @@
plugins {
id("org.jetbrains.kotlin.multiplatform")
}
kotlin {
jvm()
js(IR) {
nodejs()
}
}
@@ -0,0 +1,7 @@
package included
expect val sourceSet: String
fun greet() {
println("Hello from sourceSet $sourceSet")
}
@@ -0,0 +1,7 @@
include("included")
dependencyResolutionManagement {
repositories {
mavenCentral()
}
}
@@ -0,0 +1,7 @@
package com.example
import included.greet
fun main(args: Array<String>) {
greet()
}
@@ -0,0 +1,11 @@
package com.example
import included.greet
import kotlin.test.Test
class MainTest {
@Test
fun test() {
greet()
}
}