Skip to content

Commit

Permalink
Upgrade to 1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaoyuang committed Oct 14, 2022
1 parent 39c3f69 commit 634fe14
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 33 deletions.
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
```

Expand All @@ -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")
}
```

Expand All @@ -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:
Expand Down Expand Up @@ -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).
Expand Down
10 changes: 4 additions & 6 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
```

Expand All @@ -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")
}
```

Expand All @@ -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`
Expand Down Expand Up @@ -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) 协议下开源。
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down
2 changes: 0 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions mmkv-kotlin/MMKV_Kotlin.podspec
Original file line number Diff line number Diff line change
@@ -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 = ''
Expand All @@ -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
Expand Down
16 changes: 5 additions & 11 deletions mmkv-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -107,16 +107,16 @@ 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"))
java.setSrcDirs(listOf("src/androidTest/kotlin"))
}
defaultConfig {
minSdk = 23
targetSdk = 32
targetSdk = 33
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
testOptions {
Expand Down Expand Up @@ -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"
}*/
}
}
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 634fe14

Please sign in to comment.