-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add KMP target for iosSimulatorArm64
- Loading branch information
Showing
4 changed files
with
49 additions
and
43 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
buildSrc/src/main/java/com/squareup/workflow1/buildsrc/KotlinMultiplatformExtensions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.squareup.workflow1.buildsrc | ||
|
||
import org.gradle.kotlin.dsl.getValue | ||
import org.gradle.kotlin.dsl.getting | ||
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension | ||
|
||
fun KotlinMultiplatformExtension.iosWithSimulatorArm64() { | ||
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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,22 @@ | ||
import com.squareup.workflow1.buildsrc.iosWithSimulatorArm64 | ||
|
||
plugins { | ||
`kotlin-multiplatform` | ||
published | ||
} | ||
|
||
kotlin { | ||
iosWithSimulatorArm64() | ||
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.kotlin.test.jdk) | ||
implementation(libs.kotlinx.atomicfu) | ||
implementation(libs.kotlinx.coroutines.test.common) | ||
} | ||
} | ||
} | ||
commonTestImplementation(libs.kotlinx.atomicfu) | ||
commonTestImplementation(libs.kotlinx.coroutines.test.common) | ||
commonTestImplementation(libs.kotlin.test.jdk) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters