diff --git a/.editorconfig b/.editorconfig index 3f25798e..d7966bfa 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,2 +1,4 @@ +# noinspection EditorConfigKeyCorrectness [*.{kt,kts}] -ktlint_code_style = android_studio \ No newline at end of file +ktlint_code_style = android_studio +ktlint_function_naming_ignore_when_annotated_with=Composable \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index aca9a1ab..25822931 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -2,10 +2,10 @@ + diff --git a/CONTACT_US.md b/CONTACT_US.md index 43109801..b8e2a1ce 100644 --- a/CONTACT_US.md +++ b/CONTACT_US.md @@ -7,5 +7,5 @@ To join the Kotlin Community Slack, [request access here](http://slack.kotlinlan For direct assistance, please [reach out to Touchlab](https://go.touchlab.co/contactkamp) to discuss support options. If you find any bugs or issues in with project, you can create an issue in -the [GitHub repository](https://github.com/touchlab/KaMPKit), but please don't mistake it with general KMM helpline. You +the [GitHub repository](https://github.com/touchlab/KaMPKit), but please don't mistake it with general KMP helpline. You can get answers for general questions in Slack. diff --git a/README.md b/README.md index 11857dfd..c0c457fb 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ KaMP Kit started in early 2020 with the goal of helping developers interested in Kotlin Multiplatform (aka KMP) get started quickly with a great set of libraries and patterns. At the time, there were not many sample apps and getting started -was not trivial. The KMM situation has improved considerably since then, and various barriers to entry have been +was not trivial. The KMP situation has improved considerably since then, and various barriers to entry have been removed. Whereas KaMP Kit started with the goal of being a minimal sample, we now intend it to be less "getting started" and @@ -23,8 +23,8 @@ We updated `KaMPKit` to make sure of Touchlab's new [SKIE](https://skie.touchlab > ## Subscribe! > -> We build solutions that get teams started smoothly with Kotlin Multiplatform and ensure their success in production. Join our community to learn how your peers are adopting KMM. - [Sign up here](https://go.touchlab.co/newsletter-gh)! +> We build solutions that get teams started smoothly with Kotlin Multiplatform and ensure their success in production. Join our community to learn how your peers are adopting KMP. + [Sign up here](https://form.typeform.com/to/MJTpmm?typeform-source=touchlab.co)! ## Getting Help @@ -47,7 +47,7 @@ KaMP Kit is designed to get you past that primary stumbling block. You should be #### *Very Important Message!!!* -This kit exists because the info you may find from Google about KMM and KMP is likely to be outdated or conflicting with the config here. It is highly recommended that you reach out directly if you run into issues. +This kit exists because the info you may find from Google about KMP is likely to be outdated or conflicting with the config here. It is highly recommended that you reach out directly if you run into issues. ### Audience diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0b730406..f5091195 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - id("com.android.application") - kotlin("android") + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) } android { diff --git a/app/src/main/kotlin/co/touchlab/kampkit/android/MainApp.kt b/app/src/main/kotlin/co/touchlab/kampkit/android/MainApp.kt index d40cc2c9..18756262 100644 --- a/app/src/main/kotlin/co/touchlab/kampkit/android/MainApp.kt +++ b/app/src/main/kotlin/co/touchlab/kampkit/android/MainApp.kt @@ -20,7 +20,10 @@ class MainApp : Application() { single { this@MainApp } viewModel { BreedViewModel(get(), get { parametersOf("BreedViewModel") }) } single { - get().getSharedPreferences("KAMPSTARTER_SETTINGS", Context.MODE_PRIVATE) + get().getSharedPreferences( + "KAMPSTARTER_SETTINGS", + Context.MODE_PRIVATE + ) } single { AndroidAppInfo } single { diff --git a/app/src/main/kotlin/co/touchlab/kampkit/android/ui/Composables.kt b/app/src/main/kotlin/co/touchlab/kampkit/android/ui/Composables.kt index f6b6d2e2..d92ef37c 100644 --- a/app/src/main/kotlin/co/touchlab/kampkit/android/ui/Composables.kt +++ b/app/src/main/kotlin/co/touchlab/kampkit/android/ui/Composables.kt @@ -42,10 +42,7 @@ import co.touchlab.kermit.Logger import kotlinx.coroutines.launch @Composable -fun MainScreen( - viewModel: BreedViewModel, - log: Logger -) { +fun MainScreen(viewModel: BreedViewModel, log: Logger) { val dogsState by viewModel.breedState.collectAsStateWithLifecycle() val scope = rememberCoroutineScope() @@ -97,7 +94,11 @@ fun MainScreenContent( } } - PullRefreshIndicator(dogsState.isLoading, refreshState, Modifier.align(Alignment.TopCenter)) + PullRefreshIndicator( + dogsState.isLoading, + refreshState, + Modifier.align(Alignment.TopCenter) + ) } } } @@ -129,10 +130,7 @@ fun Error(error: String) { } @Composable -fun Success( - successData: List, - favoriteBreed: (Breed) -> Unit -) { +fun Success(successData: List, favoriteBreed: (Breed) -> Unit) { DogList(breeds = successData, favoriteBreed) } @@ -167,7 +165,8 @@ fun FavoriteIcon(breed: Breed) { animationSpec = TweenSpec( durationMillis = 500, easing = FastOutSlowInEasing - ) + ), + label = "CrossFadeFavoriteIcon" ) { fav -> if (fav) { Image( diff --git a/app/src/main/kotlin/co/touchlab/kampkit/android/ui/theme/Theme.kt b/app/src/main/kotlin/co/touchlab/kampkit/android/ui/theme/Theme.kt index d17201c4..0d0bf1f3 100644 --- a/app/src/main/kotlin/co/touchlab/kampkit/android/ui/theme/Theme.kt +++ b/app/src/main/kotlin/co/touchlab/kampkit/android/ui/theme/Theme.kt @@ -28,10 +28,7 @@ private val LightColorPalette = lightColors( ) @Composable -fun KaMPKitTheme( - darkTheme: Boolean = isSystemInDarkTheme(), - content: @Composable () -> Unit -) { +fun KaMPKitTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) { val colors = if (darkTheme) { DarkColorPalette } else { diff --git a/build.gradle.kts b/build.gradle.kts index 20c8a830..77694ab1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,24 +1,20 @@ plugins { alias(libs.plugins.ktlint) apply false + alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.multiplatform) apply false alias(libs.plugins.sqlDelight) apply false alias(libs.plugins.android.library) apply false + alias(libs.plugins.android.application) apply false alias(libs.plugins.kotlin.serialization) apply false alias(libs.plugins.skie) apply false -} - -allprojects { - repositories { - google() - mavenCentral() - } + alias(libs.plugins.cocoapods) apply false } subprojects { apply(plugin = rootProject.libs.plugins.ktlint.get().pluginId) configure { - version.set("1.0.0") + version.set("1.1.1") enableExperimentalRules.set(true) verbose.set(true) filter { @@ -34,5 +30,5 @@ subprojects { } tasks.register("clean") { - delete(rootProject.buildDir) + delete(rootProject.layout.buildDirectory) } diff --git a/docs/APP_BUILD.md b/docs/APP_BUILD.md index e8f30efc..8b5455d9 100644 --- a/docs/APP_BUILD.md +++ b/docs/APP_BUILD.md @@ -4,7 +4,7 @@ Before you build the app you will require these items: * JVM 17 -- Android SDK and the latest stable Android Studio (2022.3+) or IntelliJ(2023.2+) +- Android SDK and the latest stable Android Studio (2023.1+) or IntelliJ(2023.3+) - Mac with Xcode 14+ for the iOS build For more details, check out the [DETAILED_DEV_SETUP](DETAILED_DEV_SETUP.md) document. diff --git a/docs/DETAILED_DEV_SETUP.md b/docs/DETAILED_DEV_SETUP.md index a6aec0cb..70fb9b90 100644 --- a/docs/DETAILED_DEV_SETUP.md +++ b/docs/DETAILED_DEV_SETUP.md @@ -17,7 +17,7 @@ Some alternative options, if desired: ## Install the IDE(s) You'll also need either Android Studio, IntelliJ, or both. Android Studio is an Android development -focused skin of IntelliJ, which is more platform agnostic. There is a built-in KMM plugin in the +focused skin of IntelliJ, which is more platform agnostic. There is a built-in KMP plugin in the Android Studio, which enables you to run and debug the iOS part of your application on iOS targets straight from Android Studio. IntelliJ IDEA has a newer Kotlin API platform and gets bugfixes sooner, but it has an older version of Android Gradle Plugin. If you don't have either, we recommend diff --git a/docs/GENERAL_ARCHITECTURE.md b/docs/GENERAL_ARCHITECTURE.md index 95ca6a9e..d9b81863 100644 --- a/docs/GENERAL_ARCHITECTURE.md +++ b/docs/GENERAL_ARCHITECTURE.md @@ -4,7 +4,7 @@ * [Structure of the Project](#Structure-of-the-Project) * [Overall Architecture](#Overall-Architecture) -* [Coroutines and Ktor](#Coroutines-and-Ktor) +* [Kotlinx Coroutines](#kotlinx-Coroutines) * [Libraries and Dependencies](#Libraries-and-Dependencies) * [SKIE](#SKIE) - Swift-friendly API generator * [Kermit](#Kermit) - Logging diff --git a/docs/IOS_PROJ_INTEGRATION.md b/docs/IOS_PROJ_INTEGRATION.md index 1f249b14..688d65a8 100644 --- a/docs/IOS_PROJ_INTEGRATION.md +++ b/docs/IOS_PROJ_INTEGRATION.md @@ -35,9 +35,11 @@ cocoapods { homepage = "https://github.com/touchlab/KaMPKit" framework { isStatic = false - export(Deps.kermit) - transitiveExport = true + linkerOpts("-lsqlite3") + export(libs.touchlab.kermit.simple) } + extraSpecAttributes["swift_version"] = "\"5.0\"" // <- SKIE Needs this! + podfile = project.file("../ios/Podfile") } ``` Note that you need to apply the `native.cocoapods` plugin. diff --git a/gradle.properties b/gradle.properties index 57029690..d9775ba2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,12 +6,14 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx3g +org.gradle.jvmargs=-Xmx6g # AndroidX package structure to make it clearer which packages are bundled with the # Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true # Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official -# Tell the KMM plugin where the iOS project lives +# Tell the KMP plugin where the iOS project lives xcodeproj=./ios +org.gradle.caching=true +org.gradle.parallel=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a68d36cf..3b6f8334 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,35 +5,35 @@ targetSdk = "34" compileSdk = "34" # Dependencies -kotlin = "1.9.10" +kotlin = "1.9.22" -android-gradle-plugin = "8.1.1" -ktlint-gradle = "11.6.0" +android-gradle-plugin = "8.2.2" +ktlint-gradle = "12.1.0" -compose = "1.5.2" -composeCompiler = "1.5.3" +compose = "1.5.4" +composeCompiler = "1.5.8" -android-desugaring = "2.0.3" +android-desugaring = "2.0.4" androidx-core = "1.12.0" androidx-test-junit = "1.1.5" -androidx-activity-compose = "1.7.2" -androidx-lifecycle = "2.6.2" +androidx-activity-compose = "1.8.2" +androidx-lifecycle = "2.7.0" junit = "4.13.2" coroutines = "1.7.3" -kotlinx-datetime = "0.4.1" -ktor = "2.3.4" +kotlinx-datetime = "0.5.0" +ktor = "2.3.7" robolectric = "4.10.3" -kermit = "2.0.1" -skie = "0.5.0" +kermit = "2.0.2" +skie = "0.6.1" -koin = "3.5.0" -multiplatformSettings = "1.0.0" +koin = "3.5.3" +multiplatformSettings = "1.1.1" turbine = "1.0.0" -sqlDelight = "2.0.0" +sqlDelight = "2.0.1" [libraries] android-desugaring = { module = "com.android.tools:desugar_jdk_libs", version.ref = "android-desugaring" } @@ -78,7 +78,6 @@ sqlDelight-android = { module = "app.cash.sqldelight:android-driver", version.re sqlDelight-jvm = { module = "app.cash.sqldelight:sqlite-driver", version.ref = "sqlDelight" } sqlDelight-coroutinesExt = { module = "app.cash.sqldelight:coroutines-extensions", version.ref = "sqlDelight" } sqlDelight-native = { module = "app.cash.sqldelight:native-driver", version.ref = "sqlDelight" } -sqlDelight-runtime = { module = "app.cash.sqldelight:runtime", version.ref = "sqlDelight" } touchlab-kermit = { module = "co.touchlab:kermit", version.ref = "kermit" } touchlab-kermit-simple = { module = "co.touchlab:kermit-simple", version.ref = "kermit" } @@ -89,11 +88,14 @@ kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotl [plugins] ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint-gradle" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } sqlDelight = { id = "app.cash.sqldelight", version.ref = "sqlDelight" } +android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" } android-library = { id = "com.android.library", version.ref = "android-gradle-plugin" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } skie = { id = "co.touchlab.skie", version.ref = "skie" } +cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" } [bundles] app-ui = [ diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index ccebba77..033e24c4 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a3638774..3fa8f862 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 79a61d42..fcb6fca1 100755 --- a/gradlew +++ b/gradlew @@ -85,9 +85,6 @@ done APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +130,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0f262d4a..b3743276 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -15,9 +15,9 @@ EXTERNAL SOURCES: :path: "../shared/" SPEC CHECKSUMS: - shared: ea50f7840493e1a81d5081cf342309e93b0dfa57 + shared: 81394056467cc83be297c4a24cbe685ad921e677 SwiftLint: c585ebd615d9520d7fbdbe151f527977b0534f1e PODFILE CHECKSUM: 3130ca9ec3cd58f2c60cfe8a432d7d96d89938bf -COCOAPODS: 1.12.1 +COCOAPODS: 1.14.3 diff --git a/ios/Pods/Local Podspecs/shared.podspec.json b/ios/Pods/Local Podspecs/shared.podspec.json index aae8ed6f..ef04dc97 100644 --- a/ios/Pods/Local Podspecs/shared.podspec.json +++ b/ios/Pods/Local Podspecs/shared.podspec.json @@ -27,6 +27,7 @@ "osx": null, "ios": null, "tvos": null, + "visionos": null, "watchos": null }, "swift_version": "5.0" diff --git a/ios/Pods/Manifest.lock b/ios/Pods/Manifest.lock index 0f262d4a..b3743276 100644 --- a/ios/Pods/Manifest.lock +++ b/ios/Pods/Manifest.lock @@ -15,9 +15,9 @@ EXTERNAL SOURCES: :path: "../shared/" SPEC CHECKSUMS: - shared: ea50f7840493e1a81d5081cf342309e93b0dfa57 + shared: 81394056467cc83be297c4a24cbe685ad921e677 SwiftLint: c585ebd615d9520d7fbdbe151f527977b0534f1e PODFILE CHECKSUM: 3130ca9ec3cd58f2c60cfe8a432d7d96d89938bf -COCOAPODS: 1.12.1 +COCOAPODS: 1.14.3 diff --git a/ios/Pods/Pods.xcodeproj/project.pbxproj b/ios/Pods/Pods.xcodeproj/project.pbxproj index 19e6e65b..78403a70 100644 --- a/ios/Pods/Pods.xcodeproj/project.pbxproj +++ b/ios/Pods/Pods.xcodeproj/project.pbxproj @@ -20,7 +20,8 @@ isa = PBXAggregateTarget; buildConfigurationList = 46EB2E000001A0 /* Build configuration list for PBXAggregateTarget "shared" */; buildPhases = ( - 46EB2E00000380 /* [CP-User] Build shared */, + 46EB2E000003A0 /* [CP-User] Build shared */, + 46EB2E00000390 /* [CP] Copy dSYMs */, ); dependencies = ( ); @@ -29,20 +30,20 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ - 46EB2E000002B0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46EB2E000002A0 /* Foundation.framework */; }; - 46EB2E00000320 /* Pods-KaMPKitiOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EB2E00000310 /* Pods-KaMPKitiOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 46EB2E00000370 /* Pods-KaMPKitiOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 46EB2E00000360 /* Pods-KaMPKitiOS-dummy.m */; }; + 46EB2E000002C0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46EB2E000002B0 /* Foundation.framework */; }; + 46EB2E00000330 /* Pods-KaMPKitiOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EB2E00000320 /* Pods-KaMPKitiOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 46EB2E00000380 /* Pods-KaMPKitiOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 46EB2E00000370 /* Pods-KaMPKitiOS-dummy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 46EB2E00000390 /* PBXContainerItemProxy */ = { + 46EB2E000003B0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 46EB2E00000000 /* Project object */; proxyType = 1; remoteGlobalIDString = 52B60EC2A583F24ACBB69C113F5488B9; remoteInfo = SwiftLint; }; - 46EB2E000003B0 /* PBXContainerItemProxy */ = { + 46EB2E000003D0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 46EB2E00000000 /* Project object */; proxyType = 1; @@ -59,25 +60,26 @@ 46EB2E00000180 /* SwiftLint.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLint.release.xcconfig; sourceTree = ""; }; 46EB2E000001E0 /* shared.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = shared.debug.xcconfig; sourceTree = ""; }; 46EB2E000001F0 /* shared.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = shared.release.xcconfig; sourceTree = ""; }; - 46EB2E000002A0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 46EB2E000002D0 /* Pods-KaMPKitiOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-KaMPKitiOS.release.xcconfig"; sourceTree = ""; }; - 46EB2E000002E0 /* Pods-KaMPKitiOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-KaMPKitiOS.debug.xcconfig"; sourceTree = ""; }; - 46EB2E000002F0 /* Pods-KaMPKitiOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-KaMPKitiOS-Info.plist"; sourceTree = ""; }; - 46EB2E00000300 /* Pods-KaMPKitiOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-KaMPKitiOS.modulemap"; sourceTree = ""; }; - 46EB2E00000310 /* Pods-KaMPKitiOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-KaMPKitiOS-umbrella.h"; sourceTree = ""; }; - 46EB2E00000330 /* Pods-KaMPKitiOS-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-KaMPKitiOS-frameworks.sh"; sourceTree = ""; }; - 46EB2E00000340 /* Pods-KaMPKitiOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-KaMPKitiOS-acknowledgements.plist"; sourceTree = ""; }; - 46EB2E00000350 /* Pods-KaMPKitiOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-KaMPKitiOS-acknowledgements.markdown"; sourceTree = ""; }; - 46EB2E00000360 /* Pods-KaMPKitiOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-KaMPKitiOS-dummy.m"; sourceTree = ""; }; + 46EB2E00000200 /* shared-copy-dsyms.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "shared-copy-dsyms.sh"; sourceTree = ""; }; + 46EB2E000002B0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 46EB2E000002E0 /* Pods-KaMPKitiOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-KaMPKitiOS.release.xcconfig"; sourceTree = ""; }; + 46EB2E000002F0 /* Pods-KaMPKitiOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-KaMPKitiOS.debug.xcconfig"; sourceTree = ""; }; + 46EB2E00000300 /* Pods-KaMPKitiOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-KaMPKitiOS-Info.plist"; sourceTree = ""; }; + 46EB2E00000310 /* Pods-KaMPKitiOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-KaMPKitiOS.modulemap"; sourceTree = ""; }; + 46EB2E00000320 /* Pods-KaMPKitiOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-KaMPKitiOS-umbrella.h"; sourceTree = ""; }; + 46EB2E00000340 /* Pods-KaMPKitiOS-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-KaMPKitiOS-frameworks.sh"; sourceTree = ""; }; + 46EB2E00000350 /* Pods-KaMPKitiOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-KaMPKitiOS-acknowledgements.plist"; sourceTree = ""; }; + 46EB2E00000360 /* Pods-KaMPKitiOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-KaMPKitiOS-acknowledgements.markdown"; sourceTree = ""; }; + 46EB2E00000370 /* Pods-KaMPKitiOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-KaMPKitiOS-dummy.m"; sourceTree = ""; }; 4EDB9C40CD3583B30579DB2BE865F1D3 /* Pods-KaMPKitiOS */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-KaMPKitiOS"; path = Pods_KaMPKitiOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 46EB2E00000270 /* Frameworks */ = { + 46EB2E00000280 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 46EB2E000002B0 /* Foundation.framework in Frameworks */, + 46EB2E000002C0 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -107,7 +109,7 @@ 46EB2E00000060 /* Frameworks */ = { isa = PBXGroup; children = ( - 46EB2E00000290 /* iOS */, + 46EB2E000002A0 /* iOS */, ); name = Frameworks; sourceTree = ""; @@ -115,7 +117,7 @@ 46EB2E00000070 /* Targets Support Files */ = { isa = PBXGroup; children = ( - 46EB2E000002C0 /* Pods-KaMPKitiOS */, + 46EB2E000002D0 /* Pods-KaMPKitiOS */, ); name = "Targets Support Files"; sourceTree = ""; @@ -185,6 +187,7 @@ 46EB2E000001D0 /* Support Files */ = { isa = PBXGroup; children = ( + 46EB2E00000200 /* shared-copy-dsyms.sh */, 46EB2E000001E0 /* shared.debug.xcconfig */, 46EB2E000001F0 /* shared.release.xcconfig */, ); @@ -192,26 +195,26 @@ path = "../ios/Pods/Target Support Files/shared"; sourceTree = ""; }; - 46EB2E00000290 /* iOS */ = { + 46EB2E000002A0 /* iOS */ = { isa = PBXGroup; children = ( - 46EB2E000002A0 /* Foundation.framework */, + 46EB2E000002B0 /* Foundation.framework */, ); name = iOS; sourceTree = ""; }; - 46EB2E000002C0 /* Pods-KaMPKitiOS */ = { + 46EB2E000002D0 /* Pods-KaMPKitiOS */ = { isa = PBXGroup; children = ( - 46EB2E00000300 /* Pods-KaMPKitiOS.modulemap */, - 46EB2E00000350 /* Pods-KaMPKitiOS-acknowledgements.markdown */, - 46EB2E00000340 /* Pods-KaMPKitiOS-acknowledgements.plist */, - 46EB2E00000360 /* Pods-KaMPKitiOS-dummy.m */, - 46EB2E00000330 /* Pods-KaMPKitiOS-frameworks.sh */, - 46EB2E000002F0 /* Pods-KaMPKitiOS-Info.plist */, - 46EB2E00000310 /* Pods-KaMPKitiOS-umbrella.h */, - 46EB2E000002E0 /* Pods-KaMPKitiOS.debug.xcconfig */, - 46EB2E000002D0 /* Pods-KaMPKitiOS.release.xcconfig */, + 46EB2E00000310 /* Pods-KaMPKitiOS.modulemap */, + 46EB2E00000360 /* Pods-KaMPKitiOS-acknowledgements.markdown */, + 46EB2E00000350 /* Pods-KaMPKitiOS-acknowledgements.plist */, + 46EB2E00000370 /* Pods-KaMPKitiOS-dummy.m */, + 46EB2E00000340 /* Pods-KaMPKitiOS-frameworks.sh */, + 46EB2E00000300 /* Pods-KaMPKitiOS-Info.plist */, + 46EB2E00000320 /* Pods-KaMPKitiOS-umbrella.h */, + 46EB2E000002F0 /* Pods-KaMPKitiOS.debug.xcconfig */, + 46EB2E000002E0 /* Pods-KaMPKitiOS.release.xcconfig */, ); name = "Pods-KaMPKitiOS"; path = "Target Support Files/Pods-KaMPKitiOS"; @@ -220,11 +223,11 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 46EB2E00000250 /* Headers */ = { + 46EB2E00000260 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 46EB2E00000320 /* Pods-KaMPKitiOS-umbrella.h in Headers */, + 46EB2E00000330 /* Pods-KaMPKitiOS-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -233,18 +236,18 @@ /* Begin PBXNativeTarget section */ FA6E46E8E7462D72AFBDCEA698D24977 /* Pods-KaMPKitiOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 46EB2E00000210 /* Build configuration list for PBXNativeTarget "Pods-KaMPKitiOS" */; + buildConfigurationList = 46EB2E00000220 /* Build configuration list for PBXNativeTarget "Pods-KaMPKitiOS" */; buildPhases = ( - 46EB2E00000250 /* Headers */, - 46EB2E00000260 /* Sources */, - 46EB2E00000270 /* Frameworks */, - 46EB2E00000280 /* Resources */, + 46EB2E00000260 /* Headers */, + 46EB2E00000270 /* Sources */, + 46EB2E00000280 /* Frameworks */, + 46EB2E00000290 /* Resources */, ); buildRules = ( ); dependencies = ( - 46EB2E000003A0 /* PBXTargetDependency */, 46EB2E000003C0 /* PBXTargetDependency */, + 46EB2E000003E0 /* PBXTargetDependency */, ); name = "Pods-KaMPKitiOS"; productName = Pods_KaMPKitiOS; @@ -257,8 +260,8 @@ 46EB2E00000000 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 1240; - LastUpgradeCheck = 1240; + LastSwiftUpdateCheck = 1500; + LastUpgradeCheck = 1500; }; buildConfigurationList = 46EB2E00000030 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 10.0"; @@ -281,7 +284,7 @@ /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 46EB2E00000280 /* Resources */ = { + 46EB2E00000290 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -291,7 +294,24 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 46EB2E00000380 /* [CP-User] Build shared */ = { + 46EB2E00000390 /* [CP] Copy dSYMs */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/shared/shared-copy-dsyms-input-files.xcfilelist", + ); + name = "[CP] Copy dSYMs"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/shared/shared-copy-dsyms-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/shared/shared-copy-dsyms.sh\"\n"; + showEnvVarsInLog = 0; + }; + 46EB2E000003A0 /* [CP-User] Build shared */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -304,28 +324,28 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 46EB2E00000260 /* Sources */ = { + 46EB2E00000270 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 46EB2E00000370 /* Pods-KaMPKitiOS-dummy.m in Sources */, + 46EB2E00000380 /* Pods-KaMPKitiOS-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 46EB2E000003A0 /* PBXTargetDependency */ = { + 46EB2E000003C0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SwiftLint; target = 52B60EC2A583F24ACBB69C113F5488B9 /* SwiftLint */; - targetProxy = 46EB2E00000390 /* PBXContainerItemProxy */; + targetProxy = 46EB2E000003B0 /* PBXContainerItemProxy */; }; - 46EB2E000003C0 /* PBXTargetDependency */ = { + 46EB2E000003E0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = shared; target = 8777C9F6889E59EFFD631D80AEE9048B /* shared */; - targetProxy = 46EB2E000003B0 /* PBXContainerItemProxy */; + targetProxy = 46EB2E000003D0 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -524,9 +544,9 @@ }; name = Debug; }; - 46EB2E00000220 /* Release */ = { + 46EB2E00000230 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 46EB2E000002D0 /* Pods-KaMPKitiOS.release.xcconfig */; + baseConfigurationReference = 46EB2E000002E0 /* Pods-KaMPKitiOS.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; @@ -562,9 +582,9 @@ }; name = Release; }; - 46EB2E00000230 /* Debug */ = { + 46EB2E00000240 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 46EB2E000002E0 /* Pods-KaMPKitiOS.debug.xcconfig */; + baseConfigurationReference = 46EB2E000002F0 /* Pods-KaMPKitiOS.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; @@ -629,11 +649,11 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 46EB2E00000210 /* Build configuration list for PBXNativeTarget "Pods-KaMPKitiOS" */ = { + 46EB2E00000220 /* Build configuration list for PBXNativeTarget "Pods-KaMPKitiOS" */ = { isa = XCConfigurationList; buildConfigurations = ( - 46EB2E00000230 /* Debug */, - 46EB2E00000220 /* Release */, + 46EB2E00000240 /* Debug */, + 46EB2E00000230 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/ios/Pods/Target Support Files/Pods-KaMPKitiOS/Pods-KaMPKitiOS-frameworks.sh b/ios/Pods/Target Support Files/Pods-KaMPKitiOS/Pods-KaMPKitiOS-frameworks.sh index 1e57ae2b..4339d470 100755 --- a/ios/Pods/Target Support Files/Pods-KaMPKitiOS/Pods-KaMPKitiOS-frameworks.sh +++ b/ios/Pods/Target Support Files/Pods-KaMPKitiOS/Pods-KaMPKitiOS-frameworks.sh @@ -18,7 +18,7 @@ echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +SWIFT_STDLIB_PATH="${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" BCSYMBOLMAP_DIR="BCSymbolMaps" diff --git a/ios/Pods/Target Support Files/Pods-KaMPKitiOS/Pods-KaMPKitiOS.debug.xcconfig b/ios/Pods/Target Support Files/Pods-KaMPKitiOS/Pods-KaMPKitiOS.debug.xcconfig index edfc6a8e..fea1e7d3 100644 --- a/ios/Pods/Target Support Files/Pods-KaMPKitiOS/Pods-KaMPKitiOS.debug.xcconfig +++ b/ios/Pods/Target Support Files/Pods-KaMPKitiOS/Pods-KaMPKitiOS.debug.xcconfig @@ -3,7 +3,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../shared/build/cocoapods/framework" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -l"c++" -framework "shared" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/ios/Pods/Target Support Files/Pods-KaMPKitiOS/Pods-KaMPKitiOS.release.xcconfig b/ios/Pods/Target Support Files/Pods-KaMPKitiOS/Pods-KaMPKitiOS.release.xcconfig index edfc6a8e..fea1e7d3 100644 --- a/ios/Pods/Target Support Files/Pods-KaMPKitiOS/Pods-KaMPKitiOS.release.xcconfig +++ b/ios/Pods/Target Support Files/Pods-KaMPKitiOS/Pods-KaMPKitiOS.release.xcconfig @@ -3,7 +3,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../shared/build/cocoapods/framework" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -l"c++" -framework "shared" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/ios/Pods/Target Support Files/shared/shared.debug.xcconfig b/ios/Pods/Target Support Files/shared/shared.debug.xcconfig index 30c20002..6d5d43eb 100644 --- a/ios/Pods/Target Support Files/shared/shared.debug.xcconfig +++ b/ios/Pods/Target Support Files/shared/shared.debug.xcconfig @@ -3,7 +3,7 @@ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/shared FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../shared/build/cocoapods/framework" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 KOTLIN_PROJECT_PATH = :shared -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -l"c++" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/ios/Pods/Target Support Files/shared/shared.release.xcconfig b/ios/Pods/Target Support Files/shared/shared.release.xcconfig index 30c20002..6d5d43eb 100644 --- a/ios/Pods/Target Support Files/shared/shared.release.xcconfig +++ b/ios/Pods/Target Support Files/shared/shared.release.xcconfig @@ -3,7 +3,7 @@ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/shared FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../shared/build/cocoapods/framework" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 KOTLIN_PROJECT_PATH = :shared -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -l"c++" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/settings.gradle.kts b/settings.gradle.kts index ee6cebb6..8439efe9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,8 +1,16 @@ pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} + +dependencyResolutionManagement { + @Suppress("UnstableApiUsage") repositories { google() mavenCentral() - gradlePluginPortal() } } diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index e271496b..c1ec6b53 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -1,14 +1,14 @@ -@file:Suppress("UnstableApiUsage") - +import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi +import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("multiplatform") - kotlin("native.cocoapods") - kotlin("plugin.serialization") - id("com.android.library") - id("app.cash.sqldelight") - id("co.touchlab.skie") + alias(libs.plugins.cocoapods) + alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlin.serialization) + alias(libs.plugins.android.library) + alias(libs.plugins.sqlDelight) + alias(libs.plugins.skie) } android { @@ -18,6 +18,7 @@ android { minSdk = libs.versions.minSdk.get().toInt() testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } + @Suppress("UnstableApiUsage") testOptions { unitTests { isIncludeAndroidResources = true @@ -41,11 +42,18 @@ tasks.withType { version = "1.2" kotlin { - @Suppress("OPT_IN_USAGE") - targetHierarchy.default() - androidTarget() - ios() - // Note: iosSimulatorArm64 target requires that all dependencies have M1 support + // https://kotlinlang.org/docs/multiplatform-expect-actual.html#expected-and-actual-classes + // To suppress this warning about usage of expected and actual classes + @OptIn(ExperimentalKotlinGradlePluginApi::class) + compilerOptions { + freeCompilerArgs.add("-Xexpect-actual-classes") + } + androidTarget { + @Suppress("OPT_IN_USAGE") + unitTestVariant.sourceSetTree.set(KotlinSourceSetTree.test) + } + iosX64() + iosArm64() iosSimulatorArm64() sourceSets { @@ -57,41 +65,31 @@ kotlin { } } - val commonMain by getting { - dependencies { - implementation(libs.koin.core) - implementation(libs.coroutines.core) - implementation(libs.sqlDelight.coroutinesExt) - implementation(libs.bundles.ktor.common) - implementation(libs.multiplatformSettings.common) - implementation(libs.kotlinx.dateTime) - implementation(libs.touchlab.skie.annotations) - api(libs.touchlab.kermit) - } + commonMain.dependencies { + implementation(libs.koin.core) + implementation(libs.coroutines.core) + implementation(libs.sqlDelight.coroutinesExt) + implementation(libs.bundles.ktor.common) + implementation(libs.multiplatformSettings.common) + implementation(libs.kotlinx.dateTime) + implementation(libs.touchlab.skie.annotations) + api(libs.touchlab.kermit) } - val commonTest by getting { - dependencies { - implementation(libs.bundles.shared.commonTest) - } + commonTest.dependencies { + implementation(libs.bundles.shared.commonTest) } - val androidMain by getting { - dependencies { - implementation(libs.androidx.lifecycle.viewmodel) - implementation(libs.sqlDelight.android) - implementation(libs.ktor.client.okHttp) - } + androidMain.dependencies { + implementation(libs.androidx.lifecycle.viewmodel) + implementation(libs.sqlDelight.android) + implementation(libs.ktor.client.okHttp) } - val androidUnitTest by getting { - dependencies { - implementation(libs.bundles.shared.androidTest) - } + getByName("androidUnitTest").dependencies { + implementation(libs.bundles.shared.androidTest) } - val iosMain by getting { - dependencies { - implementation(libs.sqlDelight.native) - implementation(libs.ktor.client.ios) - api(libs.touchlab.kermit.simple) - } + iosMain.dependencies { + implementation(libs.sqlDelight.native) + implementation(libs.ktor.client.ios) + api(libs.touchlab.kermit.simple) } } diff --git a/shared/shared.podspec b/shared/shared.podspec index c9d5fc99..917c2704 100644 --- a/shared/shared.podspec +++ b/shared/shared.podspec @@ -11,6 +11,17 @@ Pod::Spec.new do |spec| + if !Dir.exist?('build/cocoapods/framework/shared.framework') || Dir.empty?('build/cocoapods/framework/shared.framework') + raise " + + Kotlin framework 'shared' doesn't exist yet, so a proper Xcode project can't be generated. + 'pod install' should be executed after running ':generateDummyFramework' Gradle task: + + ./gradlew :shared:generateDummyFramework + + Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)" + end + spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':shared', 'PRODUCT_MODULE_NAME' => 'shared', diff --git a/shared/src/androidMain/AndroidManifest.xml b/shared/src/androidMain/AndroidManifest.xml deleted file mode 100644 index a5918e68..00000000 --- a/shared/src/androidMain/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/shared/src/commonTest/kotlin/co/touchlab/kampkit/BreedViewModelTest.kt b/shared/src/commonTest/kotlin/co/touchlab/kampkit/BreedViewModelTest.kt index 55a2ddcb..4e733dd8 100644 --- a/shared/src/commonTest/kotlin/co/touchlab/kampkit/BreedViewModelTest.kt +++ b/shared/src/commonTest/kotlin/co/touchlab/kampkit/BreedViewModelTest.kt @@ -17,6 +17,7 @@ import kotlin.test.BeforeTest import kotlin.test.Test import kotlin.test.assertEquals import kotlin.time.Duration.Companion.hours +import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch @@ -42,6 +43,7 @@ class BreedViewModelTest { private val repository: BreedRepository = BreedRepository(dbHelper, settings, ktorApi, kermit, clock) + @OptIn(DelicateCoroutinesApi::class) private val viewModel by lazy { BreedViewModel(repository, kermit) .also { GlobalScope.launch { it.activate() } }