Skip to content

Commit

Permalink
Upgrade Kotlin to 1.9.20 with applyDefaultHierarchyTemplate() and add…
Browse files Browse the repository at this point in the history
…ed iosX64 target.
  • Loading branch information
iNoles committed Nov 3, 2023
1 parent f7ed13a commit b3f3cce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 36 deletions.
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
kotlin = "1.9.0"
jacoco = "0.8.8"
kotlin = "1.9.20"
jacoco = "0.8.11"

[libraries]
kotlin-test-common = { module = "org.jetbrains.kotlin:kotlin-test-common", version.ref = "kotlin" }
Expand Down
47 changes: 13 additions & 34 deletions result/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ version = if (isReleaseBuild) artifactPublishVersion else "master-$gitSha-SNAPSH

kotlin {
jvm()
ios()
iosX64()
iosArm64()
js(IR) {
browser()
binaries.executable()
Expand All @@ -31,6 +32,17 @@ kotlin {
macosArm64()
macosX64()

// Apply the default hierarchy again. It'll create, for example, the iosMain source set:
applyDefaultHierarchyTemplate()

targets.configureEach {
compilations.configureEach {
compilerOptions.configure {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
}

sourceSets {
val commonMain by getting

Expand All @@ -53,39 +65,6 @@ kotlin {
implementation(libs.kotlin.test.js)
}
}

val appleMain by creating {
dependsOn(commonMain)
}
val appleTest by creating {
dependsOn(commonTest)
}

val iosMain by getting {
dependsOn(appleMain)
}
val macosArm64Main by getting {
dependsOn(appleMain)
}
val macosX64Main by getting {
dependsOn(appleMain)
}
val iosSimulatorArm64Main by getting {
dependsOn(appleMain)
}

val iosTest by getting {
dependsOn(appleTest)
}
val iosSimulatorArm64Test by getting {
dependsOn(appleTest)
}
val macosX64Test by getting {
dependsOn(appleTest)
}
val macosArm64Test by getting {
dependsOn(appleTest)
}
}
}

Expand Down

0 comments on commit b3f3cce

Please sign in to comment.