From 634fe14c18858d0d9ea97b8c0f164f2d545671b5 Mon Sep 17 00:00:00 2001 From: qiaoyuang Date: Fri, 14 Oct 2022 23:19:15 +0800 Subject: [PATCH] Upgrade to 1.2.4 --- CHANGELOG.md | 22 +++++++++++++++++++++- README.md | 10 ++++------ README_CN.md | 10 ++++------ build.gradle.kts | 4 ++-- gradle.properties | 2 -- gradle/wrapper/gradle-wrapper.properties | 2 +- mmkv-kotlin/MMKV_Kotlin.podspec | 6 +++--- mmkv-kotlin/build.gradle.kts | 16 +++++----------- settings.gradle.kts | 2 +- 9 files changed, 41 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3761ab3..2a1b7b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,28 @@ # MMKV-Kotlin Change Log +## v1.2.4/2022-10-14 + +###Update Kotlin Version + +* Based on `Kotlin 1.7.20` + +###Update Other Build Tools + +* Gradle: 7.4.2 -> 7.5.1 + +* *com.gradle.enterprise*: 3.7 -> 3.11.2 + +* Android Target SDK API: 32 -> 33 + +* Android Build Tools: 32.0.0 -> 33.0.0 + +###Bug Fix + +* Fix the bug about empty `NSData` convert to `ByteArray` ([PR#2](https://github.com/ctripcorp/mmkv-kotlin/pull/2)) + ## v1.2.2/2022-8-25 -* Update MMKV version +* Update MMKV Version * Based on `MMKV 1.2.14` ## v1.2.1/2022-7-17 diff --git a/README.md b/README.md index 6cb4d12..d13ea95 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Kotlin Multiplatform Common (kts): ```kotlin dependencies { - implementation("com.ctrip.flight.mmkv:mmkv-kotlin:1.2.2") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin:1.2.4") } ``` @@ -22,7 +22,7 @@ Pure Android platform (kts): ```kotlin dependencies { - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-android:1.2.2") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-android:1.2.4") } ``` @@ -31,10 +31,10 @@ Kotlin/Native on macOS: ```kotlin dependencies { // Intel Chip - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosx64:1.2.2") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosx64:1.2.4") // M1&M2 Chip - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosarm64:1.2.2") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosarm64:1.2.4") } ``` 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: @@ -189,8 +189,6 @@ kvMultiProcess.set("Boolean", true) - MMKV-Kotlin currently does not support migrating old data from SharedPreferences and NSUserDefaults. -- MMKV-Kotlin is based on old Kotlin/Native memory management in Apple platform,We plan to migrate to Kotlin/Native's new memory management when it is released. - ## License Distributed under the [Apache License, Version 2.0](https://github.com/aws/jsii/tree/main/packages/jsii-reflect#license). diff --git a/README_CN.md b/README_CN.md index 36dc28d..5d30eea 100644 --- a/README_CN.md +++ b/README_CN.md @@ -10,7 +10,7 @@ Kotlin Multiplatform Common (kts): ```kotlin dependencies { - implementation("com.ctrip.flight.mmkv:mmkv-kotlin:1.2.2") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin:1.2.4") } ``` @@ -20,7 +20,7 @@ dependencies { ```kotlin dependencies { - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-android:1.2.2") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-android:1.2.4") } ``` @@ -29,10 +29,10 @@ Kotlin/Native on macOS: ```kotlin dependencies { // Intel 芯片 - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosx64:1.2.2") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosx64:1.2.4") // M1&M2 芯片 - implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosarm64:1.2.2") + implementation("com.ctrip.flight.mmkv:mmkv-kotlin-macosarm64:1.2.4") } ``` 注意,如果您在目标平台为 macOS 的 Kotlin/Native 可执行程序工程中导入 MMKV-Kotlin,您需要手动在工程中添加对 MMKV 的依赖,并添加对 MMKV 及 MMKVCore 的 `linkerOpts`: @@ -187,8 +187,6 @@ kvMultiProcess.set("Boolean", true) - MMKV-Kotlin 暂时不支持从 SharedPreferences 与 NSUserDefaults 中迁移旧数据。 -- MMKV-Kotlin 在 Apple 平台上基于旧的 Kotlin/Native 内存管理模型,我们计划在 Kotlin/Native 新内存管理模型正式发行后向其进行迁移。 - ## 开源许可 本项目于 [Apache License, Version 2.0](https://github.com/aws/jsii/tree/main/packages/jsii-reflect#license) 协议下开源。 diff --git a/build.gradle.kts b/build.gradle.kts index 2d02c27..d75fd02 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,8 +5,8 @@ buildscript { mavenCentral() } dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10") - classpath("com.android.tools.build:gradle:7.2.1") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20") + classpath("com.android.tools.build:gradle:7.3.0") } } diff --git a/gradle.properties b/gradle.properties index d9e953a..6b9a101 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,5 +20,3 @@ kotlin.mpp.enableCInteropCommonization=true kotlin.native.enableDependencyPropagation=false kotlin.native.cacheKind.iosArm64=static kotlin.native.cacheKind.iosX64=static -#kotlin.native.binary.memoryModel=experimental -#kotlin.native.binary.freezing=disabled diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4cd78a7..2a63b84 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Tue Feb 22 11:03:04 CST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/mmkv-kotlin/MMKV_Kotlin.podspec b/mmkv-kotlin/MMKV_Kotlin.podspec index 58c3ad0..b12371d 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.2' + spec.version = '1.2.4' spec.homepage = 'Link to the Shared Module homepage' spec.source = { :http=> ''} spec.authors = '' @@ -23,8 +23,8 @@ Pod::Spec.new do |spec| :execution_position => :before_compile, :shell_path => '/bin/sh', :script => <<-SCRIPT - if [ "YES" = "$COCOAPODS_SKIP_KOTLIN_BUILD" ]; then - echo "Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\"" + if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then + echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" exit 0 fi set -ev diff --git a/mmkv-kotlin/build.gradle.kts b/mmkv-kotlin/build.gradle.kts index 691238b..85da44a 100644 --- a/mmkv-kotlin/build.gradle.kts +++ b/mmkv-kotlin/build.gradle.kts @@ -9,7 +9,7 @@ plugins { signing } -version = "1.2.2" +version = "1.2.4" group = "com.ctrip.flight.mmkv" val NEXUS_USERNAME: String by project @@ -107,8 +107,8 @@ kotlin { } android { - compileSdk = 32 - buildToolsVersion = "32.0.0" + compileSdk = 33 + buildToolsVersion = "33.0.0" sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") sourceSets.getByName("androidTest") { manifest.srcFile(File("src/androidTest/AndroidManifest.xml")) @@ -116,7 +116,7 @@ android { } defaultConfig { minSdk = 23 - targetSdk = 32 + targetSdk = 33 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } testOptions { @@ -181,12 +181,6 @@ publishing { fun KotlinNativeTarget.setupNativeConfig() { compilations["main"].kotlinOptions.freeCompilerArgs += listOf( - "-Xallocator=mimalloc", "-Xruntime-logs=gc=info", "-Xexport-kdoc" + "-Xruntime-logs=gc=info", "-Xexport-kdoc" ) - binaries { - /*all { - binaryOptions["memoryModel"] = "experimental" - binaryOptions["freezing"] = "disabled" - }*/ - } } \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index c327180..4c16ec5 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -10,7 +10,7 @@ rootProject.name = "MMKV-Kotlin" include(":mmkv-kotlin") plugins { - id("com.gradle.enterprise") version("3.7") + id("com.gradle.enterprise") version("3.11.2") } gradleEnterprise {