diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1cf23ee..eb611e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: java-version: 17 - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 - name: Cache Build Tooling uses: actions/cache@v4 @@ -68,24 +68,24 @@ jobs: target: google_apis arch: x86_64 profile: pixel_6 - emulator-build: 11698152 + emulator-build: 12265550 force-avd-creation: false emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true script: echo "Generated AVD snapshot for caching." - - name: Run Android 13 Instrumented Tests + - name: Run Android 14 Instrumented Tests uses: reactivecircus/android-emulator-runner@v2 with: api-level: 34 target: google_apis arch: x86_64 profile: pixel_6 - emulator-build: 11698152 + emulator-build: 12265550 force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true - script: ./gradlew :mmkv-kotlin:connectedDebugAndroidTest --stacktrace && adb uninstall com.ctrip.flight.mmkv.test + script: ./gradlew :mmkv-kotlin:connectedDebugAndroidTest --stacktrace - name: Upload Reports uses: actions/upload-artifact@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9efc044..b080783 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,7 +30,7 @@ jobs: java-version: 17 - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 - name: Cache Build Tooling uses: actions/cache@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 12c50e1..7aa9835 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,10 @@ - Date format: YYYY-MM-dd -## v1.2.14/ 2024-xx-xx +## v1.2.14/ 2024-08-31 -Fixed the function `MMKV_KMP.withOpen` +* Fixed the function `MMKV_KMP.withOpen` +* Based on `Kotlin 2.0.20`, `MMKV 1.3.9` ## v1.2.13 / 2024-07-16 diff --git a/README.md b/README.md index dac6e05..d637458 100644 --- a/README.md +++ b/README.md @@ -12,17 +12,17 @@ Kotlin Multiplatform Common (kts): ```kotlin dependencies { - implementation("com.ctrip.flight.mmkv:mmkv-kotlin:1.2.13") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin:1.2.14") } ``` -Current version is based on `Kotlin 1.9.24` and `MMKV 1.3.7`. +Current version is based on `Kotlin 2.0.20` and `MMKV 1.3.9`. Pure Android platform (kts): ```kotlin dependencies { - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-android:1.2.13") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-android:1.2.14") } ``` @@ -31,10 +31,10 @@ Kotlin/Native on macOS: ```kotlin dependencies { // Intel Chip - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosx64:1.2.13") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosx64:1.2.14") // M1&M2 Chip - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosarm64:1.2.13") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosarm64:1.2.14") } ``` Note, if your project is a Kotlin/Native executable program project of macOS, or it supplies a framework to an iOS application project directly, then you need to manually add the dependency of MMKV, and may need to add `linkerOpts` for MMKV and MMKVCore: @@ -62,7 +62,7 @@ kotlin { cocoapods { // ...... pod(name = "MMKV") { - version = "1.3.7" + version = "1.3.9" moduleName = "MMKV" } } diff --git a/README_CN.md b/README_CN.md index 8ecf215..a561673 100644 --- a/README_CN.md +++ b/README_CN.md @@ -10,17 +10,17 @@ Kotlin Multiplatform Common (kts): ```kotlin dependencies { - implementation("com.ctrip.flight.mmkv:mmkv-kotlin:1.2.13") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin:1.2.14") } ``` -当前版本依赖于 `Kotlin 1.9.24` 以及 `MMKV 1.3.7`。 +当前版本依赖于 `Kotlin 2.0.20` 以及 `MMKV 1.3.9`。 纯 Android 平台(kts): ```kotlin dependencies { - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-android:1.2.13") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-android:1.2.14") } ``` @@ -29,10 +29,10 @@ Kotlin/Native on macOS: ```kotlin dependencies { // Intel 芯片 - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosx64:1.2.13") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosx64:1.2.14") // M1&M2 芯片 - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosarm64:1.2.13") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosarm64:1.2.14") } ``` 注意,如果你的工程为 macOS 的 Kotlin/Native 可执行程序工程,或者它直接向一个 iOS 应用程序工程提供 framework,那么您需要手动在工程中添加对 MMKV 的依赖,并可能需要添加对 MMKV 及 MMKVCore 的 `linkerOpts`: @@ -60,7 +60,7 @@ kotlin { cocoapods { // ...... pod(name = "MMKV") { - version = "1.3.7" + version = "1.3.9" moduleName = "MMKV" } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b0e2fd1..9c47d22 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,17 +1,18 @@ [versions] -kotlin = "1.9.24" -agp = "8.5.1" -mmkv = "1.3.7" +kotlin = "2.0.20" +agp = "8.6.0" +mmkv = "1.3.9" junit = "4.13.2" androidx-test = "1.6.1" +androidx-test-runner = "1.6.2" [libraries] -mmkv = { group = "com.tencent", name = "mmkv-static", version.ref = "mmkv" } +mmkv = { group = "com.tencent", name = "mmkv", version.ref = "mmkv" } junit = { group = "junit", name = "junit", version.ref = "junit" } androidx-test-core = { group = "androidx.test", name = "core", version.ref = "androidx-test" } -androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidx-test" } +androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidx-test-runner" } androidx-test-rules = { group = "androidx.test", name = "rules", version.ref = "androidx-test" } [plugins] diff --git a/mmkv-kotlin/MMKV_Kotlin.podspec b/mmkv-kotlin/MMKV_Kotlin.podspec index 121874a..89d5802 100644 --- a/mmkv-kotlin/MMKV_Kotlin.podspec +++ b/mmkv-kotlin/MMKV_Kotlin.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'mmkv_kotlin' - spec.version = '1.2.13' + spec.version = '1.2.14' spec.homepage = 'Link to the Shared Module homepage' spec.source = { :http=> ''} spec.authors = '' @@ -8,9 +8,9 @@ Pod::Spec.new do |spec| spec.summary = 'Some description for the Shared Module' spec.vendored_frameworks = 'build/cocoapods/framework/MMKV_Kotlin.framework' spec.libraries = 'c++' - spec.ios.deployment_target = '17.5.1' - spec.osx.deployment_target = '14.4.1' - spec.dependency 'MMKV', '1.3.7' + spec.ios.deployment_target = '17.5.1' + spec.osx.deployment_target = '14.4.1' + spec.dependency 'MMKV', '1.3.9' if !Dir.exist?('build/cocoapods/framework/MMKV_Kotlin.framework') || Dir.empty?('build/cocoapods/framework/MMKV_Kotlin.framework') raise " @@ -23,6 +23,10 @@ Pod::Spec.new do |spec| Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)" end + spec.xcconfig = { + 'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO', + } + spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':mmkv-kotlin', 'PRODUCT_MODULE_NAME' => 'MMKV_Kotlin', diff --git a/mmkv-kotlin/build.gradle.kts b/mmkv-kotlin/build.gradle.kts index 93d9ff8..4b2eb91 100644 --- a/mmkv-kotlin/build.gradle.kts +++ b/mmkv-kotlin/build.gradle.kts @@ -10,7 +10,7 @@ plugins { signing } -version = "1.2.13" +version = "1.2.14" group = "com.ctrip.flight.mmkv" @OptIn(ExperimentalKotlinGradlePluginApi::class) @@ -72,7 +72,7 @@ kotlin { android { namespace = "com.ctrip.flight.mmkv" - compileSdk = 35 + compileSdk = 34 defaultConfig { minSdk = 23 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"