From e692dfabe36ea6713355781e386f132e54f18939 Mon Sep 17 00:00:00 2001 From: qiaoyuang Date: Sun, 22 Jan 2023 21:43:37 +0800 Subject: [PATCH 1/3] Upgrade some build tools --- build.gradle.kts | 2 +- mmkv-kotlin/build.gradle.kts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index ee1eee8..c0485f5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ buildscript { } dependencies { classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20") - classpath("com.android.tools.build:gradle:7.3.1") + classpath("com.android.tools.build:gradle:7.4.0") } } diff --git a/mmkv-kotlin/build.gradle.kts b/mmkv-kotlin/build.gradle.kts index 61bc6c7..f0bdf78 100644 --- a/mmkv-kotlin/build.gradle.kts +++ b/mmkv-kotlin/build.gradle.kts @@ -76,7 +76,7 @@ kotlin { implementation(kotlin("test-junit")) implementation("junit:junit:4.13.2") implementation("androidx.test:core:1.5.0") - implementation("androidx.test:runner:1.5.1") + implementation("androidx.test:runner:1.5.2") implementation("androidx.test:rules:1.5.0") } } @@ -111,7 +111,7 @@ kotlin { android { compileSdk = 33 - buildToolsVersion = "33.0.0" + buildToolsVersion = "33.0.1" sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") sourceSets.getByName("androidTest") { manifest.srcFile(File("src/androidTest/AndroidManifest.xml")) @@ -129,8 +129,8 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } } From 08643bdd06f9bcb4eb0fe761d4daa4f74dac5f49 Mon Sep 17 00:00:00 2001 From: qiaoyuang Date: Mon, 23 Jan 2023 18:36:56 +0800 Subject: [PATCH 2/3] Update to 1.2.5 --- CHANGELOG.md | 15 +++++++++++++++ README.md | 12 ++++++------ README_CN.md | 12 ++++++------ mmkv-kotlin/MMKV_Kotlin.podspec | 4 ++-- mmkv-kotlin/build.gradle.kts | 5 ++--- 5 files changed, 31 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecb4d80..fc33626 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # MMKV-Kotlin Change Log +## v1.2.5/2023-01-23 + +### Update MMKV Version + +* Based on `MMKV 1.2.15` + +### Update Other Build Tools + +* Android Gradle Plugin: 7.3.0 -> 7.4.0 + +* Android Build Tools: 33.0.0 -> 33.0.1 + ## v1.2.5-alpha01/2022-12-28 * Test Github Action Publishing @@ -29,6 +41,7 @@ ## v1.2.2/2022-8-25 ### Update MMKV Version + * Based on `MMKV 1.2.14` ## v1.2.1/2022-7-17 @@ -44,6 +57,7 @@ ## v1.2.0/2022-06-13 ### Update Kotlin Version + * Based on `Kotlin 1.7.0` ## v1.1.1/2022-05-05 @@ -65,4 +79,5 @@ ## v1.0.0/2022-04-19 ### Initial Release + * Based on `Kotlin 1.6.10`, `MMKV 1.2.12` \ No newline at end of file diff --git a/README.md b/README.md index 97c5c2b..aa47c19 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.4") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin:1.2.5") } ``` -Current version based on `Kotlin 1.7.20` and `MMKV 1.2.14`. +Current version based on `Kotlin 1.7.20` and `MMKV 1.2.15`. Pure Android platform (kts): ```kotlin dependencies { - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-android:1.2.4") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-android:1.2.5") } ``` @@ -31,10 +31,10 @@ Kotlin/Native on macOS: ```kotlin dependencies { // Intel Chip - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosx64:1.2.4") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosx64:1.2.5") // M1&M2 Chip - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosarm64:1.2.4") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosarm64:1.2.5") } ``` Note, if you want to import MMKV-Kotlin to your Kotlin/Native executable project that target is macOS, you need to manually add dependency on MMKV, and add `linkerOpts` on MMKV and MMKVCore: @@ -62,7 +62,7 @@ kotlin { cocoapods { // ...... pod(name = "MMKV") { - version = "1.2.14" + version = "1.2.15" moduleName = "MMKV" } } diff --git a/README_CN.md b/README_CN.md index 034fcb8..af41cb0 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.4") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin:1.2.5") } ``` -当前版本依赖于 `Kotlin 1.7.20` 以及 `MMKV 1.2.14`。 +当前版本依赖于 `Kotlin 1.7.20` 以及 `MMKV 1.2.15`。 纯 Android 平台(kts): ```kotlin dependencies { - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-android:1.2.4") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-android:1.2.5") } ``` @@ -29,10 +29,10 @@ Kotlin/Native on macOS: ```kotlin dependencies { // Intel 芯片 - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosx64:1.2.4") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosx64:1.2.5") // M1&M2 芯片 - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosarm64:1.2.4") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosarm64:1.2.5") } ``` 注意,如果您在目标平台为 macOS 的 Kotlin/Native 可执行程序工程中导入 MMKV-Kotlin,您需要手动在工程中添加对 MMKV 的依赖,并添加对 MMKV 及 MMKVCore 的 `linkerOpts`: @@ -60,7 +60,7 @@ kotlin { cocoapods { // ...... pod(name = "MMKV") { - version = "1.2.14" + version = "1.2.15" moduleName = "MMKV" } } diff --git a/mmkv-kotlin/MMKV_Kotlin.podspec b/mmkv-kotlin/MMKV_Kotlin.podspec index 46f7316..176775f 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.5-alpha01' + spec.version = '1.2.5' spec.homepage = 'Link to the Shared Module homepage' spec.source = { :http=> ''} spec.authors = '' @@ -10,7 +10,7 @@ Pod::Spec.new do |spec| spec.libraries = 'c++' spec.ios.deployment_target = '14.1' spec.osx.deployment_target = '12.2.1' - spec.dependency 'MMKV', '1.2.14' + spec.dependency 'MMKV', '1.2.15' spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':mmkv-kotlin', diff --git a/mmkv-kotlin/build.gradle.kts b/mmkv-kotlin/build.gradle.kts index f0bdf78..af365da 100644 --- a/mmkv-kotlin/build.gradle.kts +++ b/mmkv-kotlin/build.gradle.kts @@ -9,7 +9,7 @@ plugins { signing } -version = "1.2.5-alpha01" +version = "1.2.5" group = "com.ctrip.flight.mmkv" val NEXUS_USERNAME: String by project @@ -19,7 +19,7 @@ val javadocJar: TaskProvider by tasks.registering(Jar::class) { archiveClassifier.set("javadoc") } -val mmkvVersion = "1.2.14" +val mmkvVersion = "1.2.15" kotlin { android { @@ -119,7 +119,6 @@ android { } defaultConfig { minSdk = 23 - targetSdk = 33 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } testOptions { From 51552605dcae341bb44275cab449e2bedcad2a75 Mon Sep 17 00:00:00 2001 From: qiaoyuang Date: Tue, 24 Jan 2023 23:27:35 +0800 Subject: [PATCH 3/3] Fix the problem about unit tests --- .../appleTest/kotlin/com/ctrip/flight/mmkv/MMKVKMMTestIos.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mmkv-kotlin/src/appleTest/kotlin/com/ctrip/flight/mmkv/MMKVKMMTestIos.kt b/mmkv-kotlin/src/appleTest/kotlin/com/ctrip/flight/mmkv/MMKVKMMTestIos.kt index 2873c1b..d3714db 100644 --- a/mmkv-kotlin/src/appleTest/kotlin/com/ctrip/flight/mmkv/MMKVKMMTestIos.kt +++ b/mmkv-kotlin/src/appleTest/kotlin/com/ctrip/flight/mmkv/MMKVKMMTestIos.kt @@ -16,7 +16,9 @@ package com.ctrip.flight.mmkv +import kotlinx.cinterop.toKString import platform.Foundation.* +import platform.posix.getenv import kotlin.test.* /** @@ -30,7 +32,7 @@ class MMKVKotlinTestIos { @BeforeTest fun setUp() { - initialize() + initialize("/Users/${getenv("USER")!!.toKString()}/Downloads") mmkvTest = MMKVKotlinTest().apply { setUp() }