[Gradle] add a reproducer project for KT-52172
Cherry Picked from: https://github.com/JetBrains/kotlin/pull/5045
This commit is contained in:
committed by
Space Team
parent
b706e05e65
commit
240983bca4
+28
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
plugins {
|
||||
id("org.jetbrains.kotlin.multiplatform").version("1.7.21").apply(false)
|
||||
}
|
||||
|
||||
|
||||
group = "included-build"
|
||||
version = "0.0.1"
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
plugins {
|
||||
id("org.jetbrains.kotlin.multiplatform")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js(IR) {
|
||||
nodejs()
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package included
|
||||
|
||||
expect val sourceSet: String
|
||||
|
||||
fun greet() {
|
||||
println("Hello from sourceSet $sourceSet")
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package included
|
||||
|
||||
actual val sourceSet: String
|
||||
get() = "jsMain"
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package included
|
||||
|
||||
actual val sourceSet: String
|
||||
get() = "jvmMain"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
include("included")
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
includeBuild("included-build")
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.example
|
||||
|
||||
import included.greet
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
greet()
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.example
|
||||
|
||||
import included.greet
|
||||
import kotlin.test.Test
|
||||
|
||||
class MainTest {
|
||||
@Test
|
||||
fun test() {
|
||||
greet()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user