Precise platform importing changes ported from new repository

This commit is contained in:
Yaroslav Chernyshev
2021-03-11 22:30:38 +03:00
parent 960a7dca45
commit d053ee33a8
16 changed files with 409 additions and 87 deletions
@@ -0,0 +1,71 @@
/**
* commonMain----
* / \
* jvmAndLinuxMain \
* / \ \
* jvm linuxX64 macosX64
*
* (the tests structure is the same)
*/
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()
linuxX64()
macosX64()
sourceSets {
val commonMain by getting {
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
val jvmAndLinuxMain by creating {
dependsOn(commonMain)
}
val jvmAndLinuxTest by creating {
dependsOn(commonTest)
}
val jvmMain by getting {
dependsOn(jvmAndLinuxMain)
}
val jvmTest by getting {
dependsOn(jvmAndLinuxTest)
dependencies {
implementation(kotlin("test-junit"))
}
}
val linuxX64Main by getting {
dependsOn(jvmAndLinuxMain)
}
val linuxX64Test by getting {
dependsOn(jvmAndLinuxTest)
}
}
}
@@ -0,0 +1 @@
kotlin.mpp.enableGranularSourceSetsMetadata=true
@@ -0,0 +1,9 @@
pluginManagement {
repositories {
{{kts_kotlin_plugin_repositories}}
}
}
rootProject.name = "my-app"
enableFeaturePreview("GRADLE_METADATA")
@@ -0,0 +1,71 @@
/**
* commonMain----
* / \
* jvmAndLinuxMain \
* / \ \
* jvm linuxX64 macosX64
*
* (the tests structure is the same)
*/
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()
linuxX64()
macosX64()
sourceSets {
val commonMain by getting {
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
val jvmAndLinuxMain by creating {
dependsOn(commonMain)
}
val jvmAndLinuxTest by creating {
dependsOn(commonTest)
}
val jvmMain by getting {
dependsOn(jvmAndLinuxMain)
}
val jvmTest by getting {
dependsOn(jvmAndLinuxTest)
dependencies {
implementation(kotlin("test-junit"))
}
}
val linuxX64Main by getting {
dependsOn(jvmAndLinuxMain)
}
val linuxX64Test by getting {
dependsOn(jvmAndLinuxTest)
}
}
}
@@ -0,0 +1 @@
kotlin.mpp.enableGranularSourceSetsMetadata=true
@@ -0,0 +1,11 @@
pluginManagement {
repositories {
{{kts_kotlin_plugin_repositories}}
}
}
rootProject.name = "my-app"
enableFeaturePreview("GRADLE_METADATA")
include(":submodule")
@@ -0,0 +1,18 @@
buildscript {
repositories {
{{kts_kotlin_plugin_repositories}}
}
}
repositories {
{{kts_kotlin_plugin_repositories}}
}
plugins {
kotlin("multiplatform")
}
kotlin {
js()
jvm()
}