Skip to content

Commit

Permalink
Add KMP target for iosSimulatorArm64
Browse files Browse the repository at this point in the history
  • Loading branch information
bnvinay92 committed Aug 1, 2022
1 parent 7b124cd commit 1b689a5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 43 deletions.
21 changes: 21 additions & 0 deletions buildSrc/src/main/java/kotlin-multiplatform.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,25 @@ extensions.getByType(JavaPluginExtension::class).apply {
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlin {
ios()
iosSimulatorArm64()

val iosMain by sourceSets.getting
val iosSimulatorArm64Main by sourceSets.getting
iosSimulatorArm64Main.dependsOn(iosMain)

val iosTest by sourceSets.getting
val iosSimulatorArm64Test by sourceSets.getting
iosSimulatorArm64Test.dependsOn(iosTest)

sourceSets {
all {
languageSettings.apply {
optIn("kotlin.RequiresOptIn")
}
}
}
}

project.kotlinCommonSettings(bomConfigurationName = "commonMainImplementation")
33 changes: 10 additions & 23 deletions workflow-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,15 @@ plugins {

kotlin {
jvm { withJava() }
ios()
}

dependencies {
commonMainApi(libs.kotlin.jdk6)
commonMainApi(libs.kotlinx.coroutines.core)
// For Snapshot.
commonMainApi(libs.squareup.okio)

sourceSets {
all {
languageSettings.apply {
optIn("kotlin.RequiresOptIn")
}
}
val commonMain by getting {
dependencies {
api(libs.kotlin.jdk6)
api(libs.kotlinx.coroutines.core)
// For Snapshot.
api(libs.squareup.okio)
}
}
val commonTest by getting {
dependencies {
implementation(libs.kotlinx.atomicfu)
implementation(libs.kotlinx.coroutines.test.common)
implementation(libs.kotlin.test.jdk)
}
}
}
commonTestImplementation(libs.kotlinx.atomicfu)
commonTestImplementation(libs.kotlinx.coroutines.test.common)
commonTestImplementation(libs.kotlin.test.jdk)
}
27 changes: 7 additions & 20 deletions workflow-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,14 @@ kotlin {
}
}
}
ios()
}

sourceSets {
all {
languageSettings.apply {
optIn("kotlin.RequiresOptIn")
}
}
val commonMain by getting {
dependencies {
api(project(":workflow-core"))
api(libs.kotlinx.coroutines.core)
}
}
val commonTest by getting {
dependencies {
implementation(libs.kotlinx.coroutines.test.common)
implementation(libs.kotlin.test.jdk)
}
}
}
dependencies {
commonMainApi(project(":workflow-core"))
commonMainApi(libs.kotlinx.coroutines.core)

commonTestImplementation(libs.kotlinx.coroutines.test.common)
commonTestImplementation(libs.kotlin.test.jdk)
}

benchmark {
Expand Down

0 comments on commit 1b689a5

Please sign in to comment.