diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 41ad7c2a..6bdf4015 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -34,13 +34,19 @@ android { buildFeatures { compose = true + buildConfig = true } kotlinOptions { - jvmTarget = "1.8" + jvmTarget = "17" freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.RequiresOptIn" } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + composeOptions { kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e6f7d7c9..3574ac58 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,41 +1,41 @@ [versions] -kotlin = "1.8.21" +kotlin = "1.9.21" ## SDK Versions minSdk = "21" targetSdk = "33" -compileSdk = "33" +compileSdk = "34" # Dependencies -android-gradle-plugin = "7.4.1" +android-gradle-plugin = "8.2.0" ktlint-gradle = "11.2.0" gradle-versions = "0.42.0" -compose = "1.4.3" -composeCompiler = "1.4.7" +compose = "1.5.4" +composeCompiler = "1.5.7" -android-desugaring = "1.1.8" # Don't bump to 1.2.x until AGP is 7.3.x -androidx-core = "1.9.0" -androidx-test-junit = "1.1.3" -androidx-activity-compose = "1.5.1" -androidx-lifecycle = "2.6.0" -androidx-navigation-compose = "2.5.3" +android-desugaring = "2.0.4" +androidx-core = "1.12.0" +androidx-test-junit = "1.1.5" +androidx-activity-compose = "1.8.2" +androidx-lifecycle = "2.6.2" +androidx-navigation-compose = "2.7.6" junit = "4.13.2" -coroutines = "1.7.1" -kotlinx-datetime = "0.4.0" -ktor = "2.1.1" +coroutines = "1.7.3" +kotlinx-datetime = "0.5.0" +ktor = "2.3.7" -robolectric = "4.8.2" +robolectric = "4.11.1" -kermit = "1.2.2" -stately = "1.2.3" +kermit = "2.0.2" +stately = "1.2.5" accompanist-swiperefresh = "0.25.1" -koin = "3.2.0" +koin = "3.5.0" multiplatformSettings = "1.0.0-alpha01" -turbine = "0.12.1" +turbine = "1.0.0" sqlDelight = "1.5.5" [libraries] diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b710a249..229ddcac 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Feb 16 12:29:00 CST 2023 +#Thu Jan 04 14:59:03 CET 2024 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/ios/KaMPKitiOS/AppDelegate.swift b/ios/KaMPKitiOS/AppDelegate.swift index ddcf29af..ed080661 100644 --- a/ios/KaMPKitiOS/AppDelegate.swift +++ b/ios/KaMPKitiOS/AppDelegate.swift @@ -30,7 +30,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { self.window?.rootViewController = navController self.window?.makeKeyAndVisible() - log.v(message: {"App Started"}) + log.v(throwable: nil, tag: "AppDelegate", message: {"App Started"}) return true } } diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 711a5871..7e90fb7b 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -20,4 +20,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: d5a73f50a47bad1893e4fbf8978f1bef946ebdf6 -COCOAPODS: 1.12.1 +COCOAPODS: 1.14.3 diff --git a/ios/Pods/Manifest.lock b/ios/Pods/Manifest.lock index 711a5871..7e90fb7b 100644 --- a/ios/Pods/Manifest.lock +++ b/ios/Pods/Manifest.lock @@ -20,4 +20,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: d5a73f50a47bad1893e4fbf8978f1bef946ebdf6 -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 193e5a24..89abd981 100644 --- a/ios/Pods/Pods.xcodeproj/project.pbxproj +++ b/ios/Pods/Pods.xcodeproj/project.pbxproj @@ -93,7 +93,6 @@ 46EB2E00000080 /* Pods */, 46EB2E00000020 /* Products */, 46EB2E00000070 /* Targets Support Files */, - 57975FCC640FD6F802D419B1 /* xcschemes */, ); sourceTree = ""; }; @@ -218,14 +217,6 @@ path = "Target Support Files/Pods-KaMPKitiOS"; sourceTree = ""; }; - 57975FCC640FD6F802D419B1 /* xcschemes */ = { - isa = PBXGroup; - children = ( - ); - name = xcschemes; - path = Pods.xcodeproj/xcuserdata/bartlomiejpedryc.xcuserdatad/xcschemes; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -266,8 +257,8 @@ 46EB2E00000000 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 1300; - LastUpgradeCheck = 1300; + LastSwiftUpdateCheck = 1500; + LastUpgradeCheck = 1500; }; buildConfigurationList = 46EB2E00000030 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 11.0"; 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/settings.gradle.kts b/settings.gradle.kts index 63156369..39db7805 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -9,5 +9,3 @@ pluginManagement { include(":app", ":shared") rootProject.name = "KaMPKit" - -enableFeaturePreview("VERSION_CATALOGS") diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 78ab5442..fe6d45d5 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -6,8 +6,8 @@ plugins { kotlin("plugin.serialization") id("com.android.library") id("com.squareup.sqldelight") - id("com.google.devtools.ksp") version "1.8.21-1.0.11" - id("com.rickclephas.kmp.nativecoroutines") version "1.0.0-ALPHA-9" + id("com.google.devtools.ksp") version "1.9.21-1.0.16" + id("com.rickclephas.kmp.nativecoroutines") version "1.0.0-ALPHA-23" } android { @@ -22,6 +22,11 @@ android { } } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + lint { warningsAsErrors = true abortOnError = true @@ -32,9 +37,9 @@ android { version = "1.2" kotlin { - android() - ios() - // Note: iosSimulatorArm64 target requires that all dependencies have M1 support + androidTarget() + iosX64() + iosArm64() iosSimulatorArm64() sourceSets { @@ -47,7 +52,7 @@ kotlin { } } - val commonMain by getting { + commonMain { dependencies { implementation(libs.koin.core) implementation(libs.coroutines.core) @@ -59,12 +64,12 @@ kotlin { api(libs.touchlab.kermit) } } - val commonTest by getting { + commonTest { dependencies { implementation(libs.bundles.shared.commonTest) } } - val androidMain by getting { + androidMain { dependencies { implementation(libs.androidx.lifecycle.viewmodel) implementation(libs.sqlDelight.android) @@ -76,19 +81,12 @@ kotlin { implementation(libs.bundles.shared.androidTest) } } - val iosMain by getting { + iosMain { dependencies { implementation(libs.sqlDelight.native) implementation(libs.ktor.client.ios) } } - val iosTest by getting - val iosSimulatorArm64Main by getting { - dependsOn(iosMain) - } - val iosSimulatorArm64Test by getting { - dependsOn(iosTest) - } } sourceSets.matching { it.name.endsWith("Test") } diff --git a/shared/shared.podspec b/shared/shared.podspec index 7c41fceb..8d210361 100644 --- a/shared/shared.podspec +++ b/shared/shared.podspec @@ -11,6 +11,17 @@ Pod::Spec.new do |spec| spec.ios.deployment_target = '12.4' + 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',