From 7a77b35f80714fe74fe285108d4723b413f2b1c8 Mon Sep 17 00:00:00 2001 From: John O'Reilly Date: Fri, 10 Dec 2021 14:31:20 +0000 Subject: [PATCH] m1 related changes --- build.gradle.kts | 2 +- buildSrc/src/main/java/Dependencies.kt | 8 ++++---- common/build.gradle.kts | 14 +++++++------- gradle.properties | 4 ++-- .../xcschemes/xcschememanagement.plist | 2 +- .../xcschemes/xcschememanagement.plist | 17 ++++++++++++++++- 6 files changed, 31 insertions(+), 16 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index eaab513..d70ad5b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,7 +20,7 @@ buildscript { classpath(shadow) classpath(kotlinter) classpath(gradleVersionsPlugin) - val kmpNativeCoroutinesVersion = if (kotlinVersion == "1.6.0") "0.9.0-new-mm" else "0.8.0" + val kmpNativeCoroutinesVersion = if (kotlinVersion == "1.6.0") "0.9.0" else "0.8.0" classpath("com.rickclephas.kmp:kmp-nativecoroutines-gradle-plugin:$kmpNativeCoroutinesVersion") } } diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 385b4f2..063d780 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -3,9 +3,9 @@ object Versions { const val androidCompileSdk = 31 const val androidTargetSdk = androidCompileSdk - const val kotlinCoroutines = "1.5.1-new-mm-dev2" - const val koin = "3.1.2" - const val ktor = "1.6.2-native-mm-eap-196" + const val kotlinCoroutines = "1.5.2-native-mt" + const val koin = "3.1.4" + const val ktor = "1.6.5" const val kotlinxSerialization = "1.3.0" const val kotlinxHtmlJs = "0.7.3" @@ -20,7 +20,7 @@ object Versions { const val mockito = "3.11.2" const val robolectric = "4.6.1" - const val sqlDelight = "1.5.2" + const val sqlDelight = "1.5.3" const val shadow = "7.0.0" const val kotlinterGradle = "3.4.5" diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 969a86e..c58e60c 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -1,4 +1,5 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { kotlin("multiplatform") @@ -40,15 +41,14 @@ android { } kotlin { - val sdkName: String? = System.getenv("SDK_NAME") - - val isiOSDevice = sdkName.orEmpty().startsWith("iphoneos") - if (isiOSDevice) { - iosArm64("iOS") - } else { - iosX64("iOS") + val iosTarget: (String, KotlinNativeTarget.() -> Unit) -> KotlinNativeTarget = when { + System.getenv("SDK_NAME")?.startsWith("iphoneos") == true -> ::iosArm64 + System.getenv("NATIVE_ARCH")?.startsWith("arm") == true -> ::iosSimulatorArm64 // available to KT 1.5.30 + else -> ::iosX64 } + iosTarget("iOS") {} + val sdkName: String? = System.getenv("SDK_NAME") val isWatchOSDevice = sdkName.orEmpty().startsWith("watchos") if (isWatchOSDevice) { watchosArm64("watch") diff --git a/gradle.properties b/gradle.properties index 371a152..728a2ed 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,5 +26,5 @@ xcodeproj=./ios/PeopleInSpaceSwiftUI # Kotlin/Native clients can override this through updating common.podspec kotlinVersion=1.5.31 -kotlin.native.binary.memoryModel=experimental -kotlin.native.binary.freezing=disabled +#kotlin.native.binary.memoryModel=experimental +#kotlin.native.binary.freezing=disabled diff --git a/ios/PeopleInSpaceSwiftUI/PeopleInSpaceSwiftUI.xcodeproj/xcuserdata/joreilly.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/PeopleInSpaceSwiftUI/PeopleInSpaceSwiftUI.xcodeproj/xcuserdata/joreilly.xcuserdatad/xcschemes/xcschememanagement.plist index 8fbc1f2..eafdf69 100644 --- a/ios/PeopleInSpaceSwiftUI/PeopleInSpaceSwiftUI.xcodeproj/xcuserdata/joreilly.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/ios/PeopleInSpaceSwiftUI/PeopleInSpaceSwiftUI.xcodeproj/xcuserdata/joreilly.xcuserdatad/xcschemes/xcschememanagement.plist @@ -12,7 +12,7 @@ PeopleInSpaceWidgetExtension.xcscheme_^#shared#^_ orderHint - 6 + 3 diff --git a/ios/PeopleInSpaceSwiftUI/Pods/Pods.xcodeproj/xcuserdata/joreilly.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/PeopleInSpaceSwiftUI/Pods/Pods.xcodeproj/xcuserdata/joreilly.xcuserdatad/xcschemes/xcschememanagement.plist index 45b2ee4..8f74a12 100644 --- a/ios/PeopleInSpaceSwiftUI/Pods/Pods.xcodeproj/xcuserdata/joreilly.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/ios/PeopleInSpaceSwiftUI/Pods/Pods.xcodeproj/xcuserdata/joreilly.xcuserdatad/xcschemes/xcschememanagement.plist @@ -11,6 +11,11 @@ orderHint 1 + KMPNativeCoroutinesCombine.xcscheme_^#shared#^_ + + orderHint + 2 + KMPNativeCoroutinesCore.xcscheme isShown @@ -18,12 +23,17 @@ orderHint 2 + KMPNativeCoroutinesCore.xcscheme_^#shared#^_ + + orderHint + 4 + Pods-PeopleInSpaceSwiftUI.xcscheme isShown orderHint - 3 + 1 Pods-PeopleInSpaceWidgetExtension.xcscheme @@ -32,6 +42,11 @@ orderHint 4 + Pods-PeopleInSpaceWidgetExtension.xcscheme_^#shared#^_ + + orderHint + 6 + common.xcscheme isShown