File tree Expand file tree Collapse file tree 4 files changed +49
-43
lines changed
com/squareup/workflow1/buildsrc Expand file tree Collapse file tree 4 files changed +49
-43
lines changed Original file line number Diff line number Diff line change
1
+ package com.squareup.workflow1.buildsrc
2
+
3
+ import org.gradle.kotlin.dsl.getValue
4
+ import org.gradle.kotlin.dsl.getting
5
+ import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
6
+
7
+ fun KotlinMultiplatformExtension.iosWithSimulatorArm64 () {
8
+ ios()
9
+ iosSimulatorArm64()
10
+
11
+ val iosMain by sourceSets.getting
12
+ val iosSimulatorArm64Main by sourceSets.getting
13
+ iosSimulatorArm64Main.dependsOn(iosMain)
14
+
15
+ val iosTest by sourceSets.getting
16
+ val iosSimulatorArm64Test by sourceSets.getting
17
+ iosSimulatorArm64Test.dependsOn(iosTest)
18
+ }
Original file line number Diff line number Diff line change @@ -9,4 +9,14 @@ extensions.getByType(JavaPluginExtension::class).apply {
9
9
targetCompatibility = JavaVersion .VERSION_1_8
10
10
}
11
11
12
+ kotlin {
13
+ sourceSets {
14
+ all {
15
+ languageSettings.apply {
16
+ optIn(" kotlin.RequiresOptIn" )
17
+ }
18
+ }
19
+ }
20
+ }
21
+
12
22
project.kotlinCommonSettings(bomConfigurationName = " commonMainImplementation" )
Original file line number Diff line number Diff line change
1
+ import com.squareup.workflow1.buildsrc.iosWithSimulatorArm64
2
+
1
3
plugins {
2
4
`kotlin- multiplatform`
3
5
published
4
6
}
5
7
6
8
kotlin {
9
+ iosWithSimulatorArm64()
7
10
jvm { withJava() }
8
- ios()
11
+ }
12
+
13
+ dependencies {
14
+ commonMainApi(libs.kotlin.jdk6)
15
+ commonMainApi(libs.kotlinx.coroutines.core)
16
+ // For Snapshot.
17
+ commonMainApi(libs.squareup.okio)
9
18
10
- sourceSets {
11
- all {
12
- languageSettings.apply {
13
- optIn(" kotlin.RequiresOptIn" )
14
- }
15
- }
16
- val commonMain by getting {
17
- dependencies {
18
- api(libs.kotlin.jdk6)
19
- api(libs.kotlinx.coroutines.core)
20
- // For Snapshot.
21
- api(libs.squareup.okio)
22
- }
23
- }
24
- val commonTest by getting {
25
- dependencies {
26
- implementation(libs.kotlin.test.jdk)
27
- implementation(libs.kotlinx.atomicfu)
28
- implementation(libs.kotlinx.coroutines.test.common)
29
- }
30
- }
31
- }
19
+ commonTestImplementation(libs.kotlinx.atomicfu)
20
+ commonTestImplementation(libs.kotlinx.coroutines.test.common)
21
+ commonTestImplementation(libs.kotlin.test.jdk)
32
22
}
Original file line number Diff line number Diff line change
1
+ import com.squareup.workflow1.buildsrc.iosWithSimulatorArm64
1
2
import kotlinx.benchmark.gradle.JvmBenchmarkTarget
2
3
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3
4
@@ -8,6 +9,7 @@ plugins {
8
9
}
9
10
10
11
kotlin {
12
+ iosWithSimulatorArm64()
11
13
jvm {
12
14
compilations {
13
15
val main by getting
@@ -26,28 +28,14 @@ kotlin {
26
28
}
27
29
}
28
30
}
29
- ios()
31
+ }
30
32
31
- sourceSets {
32
- all {
33
- languageSettings.apply {
34
- optIn(" kotlin.RequiresOptIn" )
35
- }
36
- }
37
- val commonMain by getting {
38
- dependencies {
39
- api(libs.kotlinx.coroutines.core)
33
+ dependencies {
34
+ commonMainApi(project(" :workflow-core" ))
35
+ commonMainApi(libs.kotlinx.coroutines.core)
40
36
41
- api(project(" :workflow-core" ))
42
- }
43
- }
44
- val commonTest by getting {
45
- dependencies {
46
- implementation(libs.kotlin.test.jdk)
47
- implementation(libs.kotlinx.coroutines.test.common)
48
- }
49
- }
50
- }
37
+ commonTestImplementation(libs.kotlinx.coroutines.test.common)
38
+ commonTestImplementation(libs.kotlin.test.jdk)
51
39
}
52
40
53
41
benchmark {
You can’t perform that action at this time.
0 commit comments