Add test on multiplatform run configurations in multiproject build
The current behaviour is undesired, see next commit for fix
This commit is contained in:
@@ -0,0 +1,35 @@
|
|||||||
|
plugins {
|
||||||
|
id 'org.jetbrains.kotlin.multiplatform' version '1.3.61'
|
||||||
|
}
|
||||||
|
|
||||||
|
group 'org.example'
|
||||||
|
version '1.0-SNAPSHOT'
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvm()
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
commonMain {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('stdlib-common')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
commonTest {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('test-common')
|
||||||
|
implementation kotlin('test-annotations-common')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
jvmMain {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('test-junit')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
|
||||||
|
|
||||||
|
mavenCentral()
|
||||||
|
|
||||||
|
maven { url 'https://plugins.gradle.org/m2/' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rootProject.name = 'testsInMultiprojectBuild'
|
||||||
|
include 'subproject'
|
||||||
|
|
||||||
Vendored
+11
@@ -0,0 +1,11 @@
|
|||||||
|
// !RENDER_TAGS: PROJECT, SETTINGS
|
||||||
|
|
||||||
|
package foo
|
||||||
|
|
||||||
|
import kotlin.test.Test
|
||||||
|
|
||||||
|
class <lineMarker descr="Run Test" project="", settings="cleanJvmTest jvmTest --tests \"foo.Foo\"">Foo</lineMarker> {
|
||||||
|
@Test
|
||||||
|
fun <lineMarker descr="Run Test" project="", settings="cleanJvmTest jvmTest --tests \"foo.Foo.test\"">test</lineMarker>() {
|
||||||
|
}
|
||||||
|
}
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
plugins {
|
||||||
|
id 'org.jetbrains.kotlin.multiplatform'
|
||||||
|
}
|
||||||
|
|
||||||
|
group 'org.example'
|
||||||
|
version '1.0-SNAPSHOT'
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvm()
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
commonMain {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('stdlib-common')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
commonTest {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('test-common')
|
||||||
|
implementation kotlin('test-annotations-common')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
jvmMain {
|
||||||
|
dependencies {
|
||||||
|
implementation kotlin('test-junit')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
// !RENDER_TAGS: PROJECT, SETTINGS
|
||||||
|
|
||||||
|
package foo
|
||||||
|
|
||||||
|
import org.junit.Test
|
||||||
|
|
||||||
|
class <lineMarker descr="Run Test" project="", settings="cleanJvmTest jvmTest --tests \"foo.SubprojectTest\"">SubprojectTest</lineMarker> {
|
||||||
|
@Test
|
||||||
|
fun <lineMarker descr="Run Test" project="", settings="cleanJvmTest jvmTest --tests \"foo.SubprojectTest.otherTest\"">otherTest</lineMarker>() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user