Add a bunch of tests on corner-cases in Gradle MPP Import
For most of those the behaviour isn't set in stone, though at the moment of making that commit we're more or less sure that it's reasonable. Behaviour in some cases might be more strictly enforces (as much as you can enforce something in esoteric cases with misconfigured project sturcture). Those are marked with comments with '!'.
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform").version("{{kotlin_plugin_version}}")
|
||||
}
|
||||
|
||||
group = "project"
|
||||
version = "1.0"
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js()
|
||||
|
||||
sourceSets {
|
||||
val pseudoOrphan by creating {
|
||||
}
|
||||
|
||||
val includedIntoJvm by creating {
|
||||
dependsOn(pseudoOrphan)
|
||||
}
|
||||
|
||||
jvm().compilations["main"].source(includedIntoJvm)
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "my-app"
|
||||
|
||||
enableFeaturePreview("GRADLE_METADATA")
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform").version("{{kotlin_plugin_version}}")
|
||||
}
|
||||
|
||||
group = "project"
|
||||
version = "1.0"
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js()
|
||||
|
||||
sourceSets {
|
||||
val commonMain by getting {}
|
||||
|
||||
val intermediateBetweenJsAndCommon by creating {
|
||||
dependsOn(commonMain)
|
||||
}
|
||||
|
||||
val jsMain by getting {
|
||||
dependsOn(intermediateBetweenJsAndCommon)
|
||||
}
|
||||
|
||||
val jvmMain by getting {
|
||||
dependsOn(jsMain)
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "my-app"
|
||||
|
||||
enableFeaturePreview("GRADLE_METADATA")
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform").version("{{kotlin_plugin_version}}")
|
||||
}
|
||||
|
||||
group = "project"
|
||||
version = "1.0"
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js()
|
||||
|
||||
sourceSets {
|
||||
val jvmMain by getting { }
|
||||
|
||||
js().compilations["main"].source(jvmMain)
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "my-app"
|
||||
|
||||
enableFeaturePreview("GRADLE_METADATA")
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform").version("{{kotlin_plugin_version}}")
|
||||
}
|
||||
|
||||
group = "project"
|
||||
version = "1.0"
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js()
|
||||
|
||||
sourceSets {
|
||||
val orphan by creating { }
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "my-app"
|
||||
|
||||
enableFeaturePreview("GRADLE_METADATA")
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform").version("{{kotlin_plugin_version}}")
|
||||
}
|
||||
|
||||
group = "project"
|
||||
version = "1.0"
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js()
|
||||
|
||||
sourceSets {
|
||||
val includedIntoJvm by creating { }
|
||||
val includedIntoJvmAndJs by creating { }
|
||||
|
||||
jvm().compilations["main"].source(includedIntoJvm)
|
||||
|
||||
jvm().compilations["main"].source(includedIntoJvmAndJs)
|
||||
js().compilations["main"].source(includedIntoJvmAndJs)
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "my-app"
|
||||
|
||||
enableFeaturePreview("GRADLE_METADATA")
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform").version("{{kotlin_plugin_version}}")
|
||||
}
|
||||
|
||||
group = "project"
|
||||
version = "1.0"
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js()
|
||||
|
||||
sourceSets {
|
||||
val commonMain by getting { }
|
||||
val jvmMain by getting { }
|
||||
val jsMain by getting { }
|
||||
|
||||
val danglingOnJvm by creating {
|
||||
dependsOn(jvmMain)
|
||||
}
|
||||
|
||||
val danglingOnCommon by creating {
|
||||
dependsOn(commonMain)
|
||||
}
|
||||
|
||||
val danglingOnJvmAndJs by creating {
|
||||
dependsOn(jvmMain)
|
||||
dependsOn(jsMain)
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
{{kts_kotlin_plugin_repositories}}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "my-app"
|
||||
|
||||
enableFeaturePreview("GRADLE_METADATA")
|
||||
Reference in New Issue
Block a user