Skip to content

Commit

Permalink
Merge pull request #40 from qiaoyuang/main
Browse files Browse the repository at this point in the history
Update version to Kotlin 2.0.20
  • Loading branch information
qiaoyuang authored Aug 31, 2024
2 parents 1ed9cb8 + 1c871ba commit ff8bfa1
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 31 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

Expand All @@ -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:
Expand Down Expand Up @@ -62,7 +62,7 @@ kotlin {
cocoapods {
// ......
pod(name = "MMKV") {
version = "1.3.7"
version = "1.3.9"
moduleName = "MMKV"
}
}
Expand Down
12 changes: 6 additions & 6 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
```

Expand All @@ -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`
Expand Down Expand Up @@ -60,7 +60,7 @@ kotlin {
cocoapods {
// ......
pod(name = "MMKV") {
version = "1.3.7"
version = "1.3.9"
moduleName = "MMKV"
}
}
Expand Down
11 changes: 6 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
12 changes: 8 additions & 4 deletions mmkv-kotlin/MMKV_Kotlin.podspec
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
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 = ''
spec.license = ''
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 "
Expand All @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions mmkv-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
signing
}

version = "1.2.13"
version = "1.2.14"
group = "com.ctrip.flight.mmkv"

@OptIn(ExperimentalKotlinGradlePluginApi::class)
Expand Down Expand Up @@ -72,7 +72,7 @@ kotlin {

android {
namespace = "com.ctrip.flight.mmkv"
compileSdk = 35
compileSdk = 34
defaultConfig {
minSdk = 23
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down

0 comments on commit ff8bfa1

Please sign in to comment.