Wizard: do not add stdlib for gradle based projects

#KT-40407 fixed
This commit is contained in:
Ilya Kirillov
2020-07-17 09:52:04 +03:00
parent d2113766e1
commit d16f246375
47 changed files with 41 additions and 166 deletions
@@ -19,7 +19,6 @@ dependencies {
implementation 'androidx.core:core-ktx:1.2.0' implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7'
} }
android { android {
compileSdkVersion 29 compileSdkVersion 29
@@ -19,7 +19,6 @@ dependencies {
implementation("androidx.core:core-ktx:1.2.0") implementation("androidx.core:core-ktx:1.2.0")
implementation("androidx.appcompat:appcompat:1.1.0") implementation("androidx.appcompat:appcompat:1.1.0")
implementation("androidx.constraintlayout:constraintlayout:1.1.3") implementation("androidx.constraintlayout:constraintlayout:1.1.3")
implementation(kotlin("stdlib-jdk7"))
} }
android { android {
compileSdkVersion(29) compileSdkVersion(29)
@@ -35,17 +35,13 @@ kotlin {
} }
sourceSets { sourceSets {
nodeJsMain { nodeJsMain {
dependencies {
implementation kotlin('stdlib-js')
}
} }
nodeJsTest { nodeJsTest {
} }
browserMain { browserMain {
dependencies {
implementation kotlin('stdlib-js')
}
} }
browserTest { browserTest {
dependencies { dependencies {
@@ -34,17 +34,9 @@ kotlin {
} }
} }
sourceSets { sourceSets {
val nodeJsMain by getting { val nodeJsMain by getting
dependencies {
implementation(kotlin("stdlib-js"))
}
}
val nodeJsTest by getting val nodeJsTest by getting
val browserMain by getting { val browserMain by getting
dependencies {
implementation(kotlin("stdlib-js"))
}
}
val browserTest by getting { val browserTest by getting {
dependencies { dependencies {
implementation(kotlin("test-js")) implementation(kotlin("test-js"))
@@ -18,9 +18,7 @@ kotlin {
} }
sourceSets { sourceSets {
jvmMain { jvmMain {
dependencies {
implementation kotlin('stdlib-jdk8')
}
} }
jvmTest { jvmTest {
dependencies { dependencies {
@@ -17,11 +17,7 @@ kotlin {
} }
} }
sourceSets { sourceSets {
val jvmMain by getting { val jvmMain by getting
dependencies {
implementation(kotlin("stdlib-jdk8"))
}
}
val jvmTest by getting { val jvmTest by getting {
dependencies { dependencies {
implementation(kotlin("test-junit")) implementation(kotlin("test-junit"))
@@ -19,9 +19,7 @@ kotlin {
} }
sourceSets { sourceSets {
jvmMain { jvmMain {
dependencies {
implementation kotlin('stdlib-jdk8')
}
} }
jvmTest { jvmTest {
dependencies { dependencies {
@@ -18,11 +18,7 @@ kotlin {
withJava() withJava()
} }
sourceSets { sourceSets {
val jvmMain by getting { val jvmMain by getting
dependencies {
implementation(kotlin("stdlib-jdk8"))
}
}
val jvmTest by getting { val jvmTest by getting {
dependencies { dependencies {
implementation(kotlin("test-junit")) implementation(kotlin("test-junit"))
@@ -16,7 +16,6 @@ dependencies {
implementation project(':b') implementation project(':b')
implementation project(':c') implementation project(':c')
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
} }
tasks.withType(KotlinCompile) { tasks.withType(KotlinCompile) {
kotlinOptions.jvmTarget = '1.8' kotlinOptions.jvmTarget = '1.8'
@@ -16,7 +16,6 @@ dependencies {
implementation(project(":b")) implementation(project(":b"))
implementation(project(":c")) implementation(project(":c"))
testImplementation(kotlin("test-junit")) testImplementation(kotlin("test-junit"))
implementation(kotlin("stdlib-jdk8"))
} }
tasks.withType<KotlinCompile>() { tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "1.8"
@@ -16,7 +16,6 @@ dependencies {
implementation project(':c') implementation project(':c')
implementation project(':d') implementation project(':d')
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
} }
tasks.withType(KotlinCompile) { tasks.withType(KotlinCompile) {
kotlinOptions.jvmTarget = '1.8' kotlinOptions.jvmTarget = '1.8'
@@ -16,7 +16,6 @@ dependencies {
implementation(project(":c")) implementation(project(":c"))
implementation(project(":d")) implementation(project(":d"))
testImplementation(kotlin("test-junit")) testImplementation(kotlin("test-junit"))
implementation(kotlin("stdlib-jdk8"))
} }
tasks.withType<KotlinCompile>() { tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "1.8"
@@ -14,7 +14,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
} }
tasks.withType(KotlinCompile) { tasks.withType(KotlinCompile) {
kotlinOptions.jvmTarget = '1.8' kotlinOptions.jvmTarget = '1.8'
@@ -14,7 +14,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation(kotlin("test-junit")) testImplementation(kotlin("test-junit"))
implementation(kotlin("stdlib-jdk8"))
} }
tasks.withType<KotlinCompile>() { tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "1.8"
@@ -15,7 +15,6 @@ repositories {
dependencies { dependencies {
implementation project(':a') implementation project(':a')
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
} }
tasks.withType(KotlinCompile) { tasks.withType(KotlinCompile) {
kotlinOptions.jvmTarget = '1.8' kotlinOptions.jvmTarget = '1.8'
@@ -15,7 +15,6 @@ repositories {
dependencies { dependencies {
implementation(project(":a")) implementation(project(":a"))
testImplementation(kotlin("test-junit")) testImplementation(kotlin("test-junit"))
implementation(kotlin("stdlib-jdk8"))
} }
tasks.withType<KotlinCompile>() { tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "1.8"
@@ -15,7 +15,6 @@ repositories {
dependencies { dependencies {
rootProject rootProject
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
} }
tasks.withType(KotlinCompile) { tasks.withType(KotlinCompile) {
kotlinOptions.jvmTarget = '1.8' kotlinOptions.jvmTarget = '1.8'
@@ -15,7 +15,6 @@ repositories {
dependencies { dependencies {
rootProject rootProject
testImplementation(kotlin("test-junit")) testImplementation(kotlin("test-junit"))
implementation(kotlin("stdlib-jdk8"))
} }
tasks.withType<KotlinCompile>() { tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "1.8"
@@ -15,7 +15,6 @@ repositories {
dependencies { dependencies {
implementation project(':b') implementation project(':b')
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
} }
tasks.withType(KotlinCompile) { tasks.withType(KotlinCompile) {
kotlinOptions.jvmTarget = '1.8' kotlinOptions.jvmTarget = '1.8'
@@ -15,7 +15,6 @@ repositories {
dependencies { dependencies {
implementation(project(":b")) implementation(project(":b"))
testImplementation(kotlin("test-junit")) testImplementation(kotlin("test-junit"))
implementation(kotlin("stdlib-jdk8"))
} }
tasks.withType<KotlinCompile>() { tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "1.8"
@@ -14,7 +14,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
} }
tasks.withType(KotlinCompile) { tasks.withType(KotlinCompile) {
kotlinOptions.jvmTarget = '1.8' kotlinOptions.jvmTarget = '1.8'
@@ -14,7 +14,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation(kotlin("test-junit")) testImplementation(kotlin("test-junit"))
implementation(kotlin("stdlib-jdk8"))
} }
tasks.withType<KotlinCompile>() { tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "1.8"
@@ -14,7 +14,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
} }
tasks.withType(KotlinCompile) { tasks.withType(KotlinCompile) {
kotlinOptions.jvmTarget = '1.6' kotlinOptions.jvmTarget = '1.6'
@@ -14,7 +14,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation(kotlin("test-junit")) testImplementation(kotlin("test-junit"))
implementation(kotlin("stdlib-jdk8"))
} }
tasks.withType<KotlinCompile>() { tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.6" kotlinOptions.jvmTarget = "1.6"
@@ -35,9 +35,7 @@ kotlin {
} }
sourceSets { sourceSets {
jvmMain { jvmMain {
dependencies {
implementation kotlin('stdlib-jdk8')
}
} }
jvmTest { jvmTest {
dependencies { dependencies {
@@ -45,9 +43,7 @@ kotlin {
} }
} }
aMain { aMain {
dependencies {
implementation kotlin('stdlib-js')
}
} }
aTest { aTest {
dependencies { dependencies {
@@ -34,21 +34,13 @@ kotlin {
} }
} }
sourceSets { sourceSets {
val jvmMain by getting { val jvmMain by getting
dependencies {
implementation(kotlin("stdlib-jdk8"))
}
}
val jvmTest by getting { val jvmTest by getting {
dependencies { dependencies {
implementation(kotlin("test-junit")) implementation(kotlin("test-junit"))
} }
} }
val aMain by getting { val aMain by getting
dependencies {
implementation(kotlin("stdlib-js"))
}
}
val aTest by getting { val aTest by getting {
dependencies { dependencies {
implementation(kotlin("test-js")) implementation(kotlin("test-js"))
@@ -12,7 +12,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation 'org.jetbrains.kotlin:kotlin-test-js' testImplementation 'org.jetbrains.kotlin:kotlin-test-js'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
} }
kotlin { kotlin {
js { js {
@@ -12,7 +12,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation(kotlin("test-js")) testImplementation(kotlin("test-js"))
implementation(kotlin("stdlib-js"))
} }
kotlin { kotlin {
js { js {
@@ -14,7 +14,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
} }
tasks.withType(KotlinCompile) { tasks.withType(KotlinCompile) {
kotlinOptions.jvmTarget = '1.8' kotlinOptions.jvmTarget = '1.8'
@@ -14,7 +14,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation(kotlin("test-junit")) testImplementation(kotlin("test-junit"))
implementation(kotlin("stdlib-jdk8"))
} }
tasks.withType<KotlinCompile>() { tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "1.8"
@@ -15,7 +15,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit' testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
} }
tasks.withType(KotlinCompile) { tasks.withType(KotlinCompile) {
kotlinOptions.jvmTarget = '1.8' kotlinOptions.jvmTarget = '1.8'
@@ -15,7 +15,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation(kotlin("test-junit")) testImplementation(kotlin("test-junit"))
implementation(kotlin("stdlib-jdk8"))
} }
tasks.withType<KotlinCompile>() { tasks.withType<KotlinCompile>() {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "1.8"
@@ -19,7 +19,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation 'org.jetbrains.kotlin:kotlin-test-js' testImplementation 'org.jetbrains.kotlin:kotlin-test-js'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
implementation 'org.jetbrains.kotlinx:kotlinx-html-js:0.7.1-KOTLIN_VERSION' implementation 'org.jetbrains.kotlinx:kotlinx-html-js:0.7.1-KOTLIN_VERSION'
implementation 'org.jetbrains:kotlin-react:16.13.1-pre.109-kotlin-KOTLIN_VERSION' implementation 'org.jetbrains:kotlin-react:16.13.1-pre.109-kotlin-KOTLIN_VERSION'
implementation 'org.jetbrains:kotlin-react-dom:16.13.1-pre.109-kotlin-KOTLIN_VERSION' implementation 'org.jetbrains:kotlin-react-dom:16.13.1-pre.109-kotlin-KOTLIN_VERSION'
@@ -19,7 +19,6 @@ repositories {
} }
dependencies { dependencies {
testImplementation(kotlin("test-js")) testImplementation(kotlin("test-js"))
implementation(kotlin("stdlib-js"))
implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.7.1-KOTLIN_VERSION") implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.7.1-KOTLIN_VERSION")
implementation("org.jetbrains:kotlin-react:16.13.1-pre.109-kotlin-KOTLIN_VERSION") implementation("org.jetbrains:kotlin-react:16.13.1-pre.109-kotlin-KOTLIN_VERSION")
implementation("org.jetbrains:kotlin-react-dom:16.13.1-pre.109-kotlin-KOTLIN_VERSION") implementation("org.jetbrains:kotlin-react-dom:16.13.1-pre.109-kotlin-KOTLIN_VERSION")
@@ -49,9 +49,7 @@ kotlin {
} }
sourceSets { sourceSets {
commonMain { commonMain {
dependencies {
implementation kotlin('stdlib-common')
}
} }
commonTest { commonTest {
dependencies { dependencies {
@@ -61,7 +59,6 @@ kotlin {
} }
jvmMain { jvmMain {
dependencies { dependencies {
implementation kotlin('stdlib-jdk8')
implementation 'io.ktor:ktor-server-netty:1.3.2-KOTLIN_VERSION' implementation 'io.ktor:ktor-server-netty:1.3.2-KOTLIN_VERSION'
implementation 'io.ktor:ktor-html-builder:1.3.2-KOTLIN_VERSION' implementation 'io.ktor:ktor-html-builder:1.3.2-KOTLIN_VERSION'
implementation 'org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.1-KOTLIN_VERSION' implementation 'org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.1-KOTLIN_VERSION'
@@ -74,7 +71,6 @@ kotlin {
} }
jsMain { jsMain {
dependencies { dependencies {
implementation kotlin('stdlib-js')
implementation 'org.jetbrains.kotlinx:kotlinx-html-js:0.7.1-KOTLIN_VERSION' implementation 'org.jetbrains.kotlinx:kotlinx-html-js:0.7.1-KOTLIN_VERSION'
implementation 'org.jetbrains:kotlin-react:16.13.1-pre.109-kotlin-KOTLIN_VERSION' implementation 'org.jetbrains:kotlin-react:16.13.1-pre.109-kotlin-KOTLIN_VERSION'
implementation 'org.jetbrains:kotlin-react-dom:16.13.1-pre.109-kotlin-KOTLIN_VERSION' implementation 'org.jetbrains:kotlin-react-dom:16.13.1-pre.109-kotlin-KOTLIN_VERSION'
@@ -48,11 +48,7 @@ kotlin {
} }
} }
sourceSets { sourceSets {
val commonMain by getting { val commonMain by getting
dependencies {
implementation(kotlin("stdlib-common"))
}
}
val commonTest by getting { val commonTest by getting {
dependencies { dependencies {
implementation(kotlin("test-common")) implementation(kotlin("test-common"))
@@ -61,7 +57,6 @@ kotlin {
} }
val jvmMain by getting { val jvmMain by getting {
dependencies { dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("io.ktor:ktor-server-netty:1.3.2-KOTLIN_VERSION") implementation("io.ktor:ktor-server-netty:1.3.2-KOTLIN_VERSION")
implementation("io.ktor:ktor-html-builder:1.3.2-KOTLIN_VERSION") implementation("io.ktor:ktor-html-builder:1.3.2-KOTLIN_VERSION")
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.1-KOTLIN_VERSION") implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.1-KOTLIN_VERSION")
@@ -74,7 +69,6 @@ kotlin {
} }
val jsMain by getting { val jsMain by getting {
dependencies { dependencies {
implementation(kotlin("stdlib-js"))
implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.7.1-KOTLIN_VERSION") implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.7.1-KOTLIN_VERSION")
implementation("org.jetbrains:kotlin-react:16.13.1-pre.109-kotlin-KOTLIN_VERSION") implementation("org.jetbrains:kotlin-react:16.13.1-pre.109-kotlin-KOTLIN_VERSION")
implementation("org.jetbrains:kotlin-react-dom:16.13.1-pre.109-kotlin-KOTLIN_VERSION") implementation("org.jetbrains:kotlin-react-dom:16.13.1-pre.109-kotlin-KOTLIN_VERSION")
@@ -14,9 +14,7 @@ kotlin {
sourceSets { sourceSets {
commonMain { commonMain {
dependencies {
implementation kotlin('stdlib-common')
}
} }
commonTest { commonTest {
dependencies { dependencies {
@@ -13,11 +13,7 @@ repositories {
kotlin { kotlin {
sourceSets { sourceSets {
val commonMain by getting { val commonMain by getting
dependencies {
implementation(kotlin("stdlib-common"))
}
}
val commonTest by getting { val commonTest by getting {
dependencies { dependencies {
implementation(kotlin("test-common")) implementation(kotlin("test-common"))
@@ -39,9 +39,7 @@ kotlin {
sourceSets { sourceSets {
commonMain { commonMain {
dependencies {
implementation kotlin('stdlib-common')
}
} }
commonTest { commonTest {
dependencies { dependencies {
@@ -50,9 +48,7 @@ kotlin {
} }
} }
jvmMain { jvmMain {
dependencies {
implementation kotlin('stdlib-jdk8')
}
} }
jvmTest { jvmTest {
dependencies { dependencies {
@@ -60,9 +56,7 @@ kotlin {
} }
} }
jsMain { jsMain {
dependencies {
implementation kotlin('stdlib-js')
}
} }
jsTest { jsTest {
dependencies { dependencies {
@@ -37,32 +37,20 @@ kotlin {
sourceSets { sourceSets {
val commonMain by getting { val commonMain by getting
dependencies {
implementation(kotlin("stdlib-common"))
}
}
val commonTest by getting { val commonTest by getting {
dependencies { dependencies {
implementation(kotlin("test-common")) implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common")) implementation(kotlin("test-annotations-common"))
} }
} }
val jvmMain by getting { val jvmMain by getting
dependencies {
implementation(kotlin("stdlib-jdk8"))
}
}
val jvmTest by getting { val jvmTest by getting {
dependencies { dependencies {
implementation(kotlin("test-junit")) implementation(kotlin("test-junit"))
} }
} }
val jsMain by getting { val jsMain by getting
dependencies {
implementation(kotlin("stdlib-js"))
}
}
val jsTest by getting { val jsTest by getting {
dependencies { dependencies {
implementation(kotlin("test-js")) implementation(kotlin("test-js"))
@@ -20,7 +20,6 @@ dependencies {
implementation 'androidx.core:core-ktx:1.2.0' implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7'
} }
android { android {
compileSdkVersion 29 compileSdkVersion 29
@@ -20,7 +20,6 @@ dependencies {
implementation("androidx.core:core-ktx:1.2.0") implementation("androidx.core:core-ktx:1.2.0")
implementation("androidx.appcompat:appcompat:1.1.0") implementation("androidx.appcompat:appcompat:1.1.0")
implementation("androidx.constraintlayout:constraintlayout:1.1.3") implementation("androidx.constraintlayout:constraintlayout:1.1.3")
implementation(kotlin("stdlib-jdk7"))
} }
android { android {
compileSdkVersion(29) compileSdkVersion(29)
@@ -28,9 +28,7 @@ kotlin {
} }
sourceSets { sourceSets {
commonMain { commonMain {
dependencies {
implementation kotlin('stdlib-common')
}
} }
commonTest { commonTest {
dependencies { dependencies {
@@ -40,7 +38,6 @@ kotlin {
} }
androidMain { androidMain {
dependencies { dependencies {
implementation kotlin('stdlib-jdk7')
implementation 'androidx.core:core-ktx:1.2.0' implementation 'androidx.core:core-ktx:1.2.0'
} }
} }
@@ -27,11 +27,7 @@ kotlin {
} }
} }
sourceSets { sourceSets {
val commonMain by getting { val commonMain by getting
dependencies {
implementation(kotlin("stdlib-common"))
}
}
val commonTest by getting { val commonTest by getting {
dependencies { dependencies {
implementation(kotlin("test-common")) implementation(kotlin("test-common"))
@@ -40,7 +36,6 @@ kotlin {
} }
val androidMain by getting { val androidMain by getting {
dependencies { dependencies {
implementation(kotlin("stdlib-jdk7"))
implementation("androidx.core:core-ktx:1.2.0") implementation("androidx.core:core-ktx:1.2.0")
} }
} }
@@ -26,9 +26,7 @@ kotlin {
} }
sourceSets { sourceSets {
commonMain { commonMain {
dependencies {
implementation kotlin('stdlib-common')
}
} }
commonTest { commonTest {
dependencies { dependencies {
@@ -38,7 +36,6 @@ kotlin {
} }
androidMain { androidMain {
dependencies { dependencies {
implementation kotlin('stdlib-jdk7')
implementation 'androidx.core:core-ktx:1.2.0' implementation 'androidx.core:core-ktx:1.2.0'
} }
} }
@@ -25,11 +25,7 @@ kotlin {
} }
} }
sourceSets { sourceSets {
val commonMain by getting { val commonMain by getting
dependencies {
implementation(kotlin("stdlib-common"))
}
}
val commonTest by getting { val commonTest by getting {
dependencies { dependencies {
implementation(kotlin("test-common")) implementation(kotlin("test-common"))
@@ -38,7 +34,6 @@ kotlin {
} }
val androidMain by getting { val androidMain by getting {
dependencies { dependencies {
implementation(kotlin("stdlib-jdk7"))
implementation("androidx.core:core-ktx:1.2.0") implementation("androidx.core:core-ktx:1.2.0")
} }
} }
@@ -9,11 +9,11 @@ import org.jetbrains.kotlin.tools.projectWizard.core.service.WizardKotlinVersion
import org.jetbrains.kotlin.tools.projectWizard.ir.buildsystem.* import org.jetbrains.kotlin.tools.projectWizard.ir.buildsystem.*
import org.jetbrains.kotlin.tools.projectWizard.moduleConfigurators.* import org.jetbrains.kotlin.tools.projectWizard.moduleConfigurators.*
import org.jetbrains.kotlin.tools.projectWizard.plugins.buildSystem.BuildSystemType import org.jetbrains.kotlin.tools.projectWizard.plugins.buildSystem.BuildSystemType
import org.jetbrains.kotlin.tools.projectWizard.plugins.buildSystem.buildSystemType
import org.jetbrains.kotlin.tools.projectWizard.plugins.buildSystem.gradle.GradlePlugin import org.jetbrains.kotlin.tools.projectWizard.plugins.buildSystem.gradle.GradlePlugin
import org.jetbrains.kotlin.tools.projectWizard.plugins.buildSystem.isGradle import org.jetbrains.kotlin.tools.projectWizard.plugins.buildSystem.isGradle
import org.jetbrains.kotlin.tools.projectWizard.plugins.templates.TemplatesPlugin import org.jetbrains.kotlin.tools.projectWizard.plugins.templates.TemplatesPlugin
import org.jetbrains.kotlin.tools.projectWizard.settings.buildsystem.* import org.jetbrains.kotlin.tools.projectWizard.settings.buildsystem.*
import org.jetbrains.kotlin.tools.projectWizard.settings.version.Version
import java.nio.file.Path import java.nio.file.Path
data class ModulesToIrConversionData( data class ModulesToIrConversionData(
@@ -143,16 +143,7 @@ class ModulesToIRsConverter(
val dependenciesIRs = buildPersistenceList<BuildSystemIR> { val dependenciesIRs = buildPersistenceList<BuildSystemIR> {
+moduleDependencies +moduleDependencies
with(configurator) { +createModuleIRs(this@createSinglePlatformModule, data, module) } with(configurator) { +createModuleIRs(this@createSinglePlatformModule, data, module) }
addIfNotNull( addIfNotNull(addSdtLibForNonGradleSignleplatformModule(module))
configurator.createStdlibType(data, module)?.let { stdlibType ->
KotlinStdlibDependencyIR(
type = stdlibType,
isInMppModule = false,
kotlinVersion = data.kotlinVersion,
dependencyType = DependencyType.MAIN
)
}
)
} }
val moduleIr = SingleplatformModuleIR( val moduleIr = SingleplatformModuleIR(
@@ -237,25 +228,11 @@ class ModulesToIRsConverter(
mutateProjectStructureByModuleConfigurator(target, modulePath) mutateProjectStructureByModuleConfigurator(target, modulePath)
val sourcesetss = target.sourcesets.map { sourceset -> val sourcesetss = target.sourcesets.map { sourceset ->
val sourcesetName = target.name + sourceset.sourcesetType.name.capitalize() val sourcesetName = target.name + sourceset.sourcesetType.name.capitalize()
val sourcesetIrs = buildList<BuildSystemIR> {
if (sourceset.sourcesetType == SourcesetType.main) {
addIfNotNull(
target.configurator.createStdlibType(data, target)?.let { stdlibType ->
KotlinStdlibDependencyIR(
type = stdlibType,
isInMppModule = true,
kotlinVersion = data.kotlinVersion,
dependencyType = DependencyType.MAIN
)
}
)
}
}
MultiplatformSourcesetIR( MultiplatformSourcesetIR(
sourceset.sourcesetType, sourceset.sourcesetType,
modulePath / Defaults.SRC_DIR / sourcesetName, modulePath / Defaults.SRC_DIR / sourcesetName,
target.name, target.name,
sourcesetIrs.toPersistentList(), persistentListOf(),
sourceset sourceset
) )
} }
@@ -283,6 +260,18 @@ class ModulesToIRsConverter(
} }
} }
private fun Reader.addSdtLibForNonGradleSignleplatformModule(module: Module): KotlinStdlibDependencyIR? {
// for gradle stdlib is added by default KT-38221
if (buildSystemType.isGradle) return null
val stdlibType = module.configurator.createStdlibType(data, module) ?: return null
return KotlinStdlibDependencyIR(
type = stdlibType,
isInMppModule = false,
kotlinVersion = data.kotlinVersion,
dependencyType = DependencyType.MAIN
)
}
private fun Reader.createBuildFileIRs( private fun Reader.createBuildFileIRs(
module: Module, module: Module,
state: ModulesToIrsState state: ModulesToIrsState