From c44ce1fb2e07a2d274029b3d117c1ed3e97dcfa7 Mon Sep 17 00:00:00 2001 From: guoling Date: Fri, 5 Jul 2024 18:32:25 +0800 Subject: [PATCH] prepare for v1.3.6 --- Android/MMKV/gradle.properties | 2 +- Android/MMKV/mmkv/build.gradle | 8 ++--- Android/MMKV/mmkvdemo/build.gradle | 6 ++-- CHANGELOG.md | 35 +++++++++++++++++++ Core/MMKVPredef.h | 2 +- OpenHarmony/MMKV/CHANGELOG.md | 12 +++---- OpenHarmony/MMKV/oh-package.json5 | 2 +- OpenHarmony/entry/oh-package.json5 | 2 +- README.md | 6 ++-- README_CN.md | 4 +-- flutter/mmkv/CHANGELOG.md | 5 +++ flutter/mmkv/example/android/app/build.gradle | 2 +- flutter/mmkv/pubspec.yaml | 8 ++--- flutter/mmkv_android/CHANGELOG.md | 3 ++ flutter/mmkv_android/android/build.gradle | 2 +- flutter/mmkv_android/pubspec.yaml | 2 +- flutter/mmkv_ios/CHANGELOG.md | 3 ++ flutter/mmkv_ios/pubspec.yaml | 2 +- iOS/MMKV.podspec | 4 +-- iOS/MMKV/MMKV.xcodeproj/project.pbxproj | 12 +++---- iOS/MMKVAppExtension.podspec | 4 +-- iOS/MMKVCore.podspec | 2 +- iOS/MMKVWatchExtension.podspec | 4 +-- 23 files changed, 89 insertions(+), 43 deletions(-) diff --git a/Android/MMKV/gradle.properties b/Android/MMKV/gradle.properties index 969b8f84..0cf45a4a 100644 --- a/Android/MMKV/gradle.properties +++ b/Android/MMKV/gradle.properties @@ -14,7 +14,7 @@ org.gradle.jvmargs=-Xmx1536m # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME_PREFIX=1.3.5 +VERSION_NAME_PREFIX=1.3.6 #VERSION_NAME_SUFFIX=-SNAPSHOT VERSION_NAME_SUFFIX= diff --git a/Android/MMKV/mmkv/build.gradle b/Android/MMKV/mmkv/build.gradle index a368fcdb..cfaabb80 100644 --- a/Android/MMKV/mmkv/build.gradle +++ b/Android/MMKV/mmkv/build.gradle @@ -84,11 +84,11 @@ configurations { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'androidx.annotation:annotation:1.7.1' - javadocDeps 'androidx.annotation:annotation:1.7.1' + implementation 'androidx.annotation:annotation:1.8.0' + javadocDeps 'androidx.annotation:annotation:1.8.0' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.5.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + androidTestImplementation 'androidx.test:runner:1.6.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' compileOnly project(':mmkvannotation') } diff --git a/Android/MMKV/mmkvdemo/build.gradle b/Android/MMKV/mmkvdemo/build.gradle index be0a6ca6..d90ea734 100644 --- a/Android/MMKV/mmkvdemo/build.gradle +++ b/Android/MMKV/mmkvdemo/build.gradle @@ -77,9 +77,9 @@ repositories { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation project(':mmkv') -// implementation 'com.tencent:mmkv:1.3.5' -// implementation 'com.tencent:mmkv-static:1.3.5' // this is identical to 'com.tencent:mmkv' -// implementation 'com.tencent:mmkv-shared:1.3.5' +// implementation 'com.tencent:mmkv:1.3.6' +// implementation 'com.tencent:mmkv-static:1.3.6' // this is identical to 'com.tencent:mmkv' +// implementation 'com.tencent:mmkv-shared:1.3.6' implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' testImplementation 'junit:junit:4.13.2' diff --git a/CHANGELOG.md b/CHANGELOG.md index d42cedbc..b8f1e5c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,39 @@ # MMKV Change Log +## v1.3.6 / 2024-07-05 +### Changes for All platforms +* The Core library now upgrades the C++ standard from C++17 to C++20 to make the most of morden C++ feature such as `Concept` & unordered containers with `std::string_view` as key. From now on, if you build MMKV by source (iOS, Windows, POSIX, etc), you will need a C++ compiler that supports the C++20 standard. If you only use MMKV in binary (Android, OHOS, etc), this upgrade of the C++ compiler is not required. +* The key type changes from `std::string` to `std::string_view`, to avoid unnecessary string construction and destruction when the key is a raw string. + +### Android +* Use the latest ashmem API if possible. +* Use the latest API to get the device API level. + +### Flutter +* MMKV will try to load libmmkv.so before Dart code, to reduce the error of loading library in Android. + +### HarmonyOS NEXT +* Fix a bug that a `String` value might get truncated on encoding. +* MMKV returns `undefined` when a key does not exist, previously a default value of the type (`false` for `boolean`, `0` for `number`, etc) is returned. +* Add the feature to encode/decode a `float` value. +* Add the feature to encode/decode a `TypedArray` value. +* Support encoding a part of an `ArrayBuffer`. + +### iOS/macOS +* Hide the default `NSObject.initialize()` from Swift/ObjC to prevent potential misuse. + +### POSIX +* Support encode/decode `std::vector` or `std::span` values, with T as primitive types. +* Fix a compile error on Linux env. +* Fix a compile error on the GNU compiler. +* Fix a compile error with some old version of zlib (on CentOS). + +### Python +* Python now runs on Windows. Check out the latest [wiki](https://github.com/Tencent/MMKV/wiki/python_setup) for instructions. + +### Windows +* Support encode/decode `std::vector` or `std::span` values, with T as primitive types. +* Python now runs on Windows. Check out the latest [wiki](https://github.com/Tencent/MMKV/wiki/python_setup) for instructions. + ## v1.3.5 / 2024-04-24 ### HarmonyOS NEXT * This is the first official support of HarmonyOS NEXT. diff --git a/Core/MMKVPredef.h b/Core/MMKVPredef.h index 47c5c1d6..6a268e39 100755 --- a/Core/MMKVPredef.h +++ b/Core/MMKVPredef.h @@ -34,7 +34,7 @@ #include #include -constexpr auto MMKV_VERSION = "v1.3.6-beta3"; +constexpr auto MMKV_VERSION = "v1.3.6"; #ifdef DEBUG # define MMKV_DEBUG diff --git a/OpenHarmony/MMKV/CHANGELOG.md b/OpenHarmony/MMKV/CHANGELOG.md index 1d6a6851..9573b978 100644 --- a/OpenHarmony/MMKV/CHANGELOG.md +++ b/OpenHarmony/MMKV/CHANGELOG.md @@ -1,11 +1,11 @@ # MMKV for HarmonyOS NEXT Change Log -## v1.3.6-beta3 / 2024-06-28 -* Add encode / decode `float` interface. -* Add encode / decode all `TypedArray` interface. -* Fix a bug when transforming a JavaScript string to a native string, the last char might lost. -* Fix a bug when decoding an non-existent value of primitive types, `undefined` is not returned. -* Fix a bug when encoding a TypedArray with only a view of a ArrayBuffer, it will not be encoded correctly. +## v1.3.6 / 2024-07-05 +* Fix a bug that a `String` value might get truncated on encoding. +* MMKV returns `undefined` when a key does not exist, previously a default value of the type (`false` for `boolean`, `0` for `number`, etc) is returned. +* Add the feature to encode/decode a `float` value. +* Add the feature to encode/decode a `TypedArray` value. +* Support encoding a part of an `ArrayBuffer`. ## v1.3.5 / 2024-04-24 Fix a bug in `MMKV.initialize()` that fails to handle the optional parameter _logLevel_. diff --git a/OpenHarmony/MMKV/oh-package.json5 b/OpenHarmony/MMKV/oh-package.json5 index 7fba0440..34a00566 100644 --- a/OpenHarmony/MMKV/oh-package.json5 +++ b/OpenHarmony/MMKV/oh-package.json5 @@ -1,6 +1,6 @@ { "name": "@tencent/mmkv", - "version": "1.3.6-beta3", + "version": "1.3.6", "description": "The official OpenHarmony package of MMKV. An efficient, small mobile key-value storage framework developed by WeChat.", "main": "Index.ets", "author": "guoling", diff --git a/OpenHarmony/entry/oh-package.json5 b/OpenHarmony/entry/oh-package.json5 index 51145fd7..48a60982 100644 --- a/OpenHarmony/entry/oh-package.json5 +++ b/OpenHarmony/entry/oh-package.json5 @@ -7,7 +7,7 @@ "license": "BSD 3-Clause", "dependencies": { "@tencent/mmkv": "file:../MMKV" -// "@tencent/mmkv": "1.3.6-beta2", +// "@tencent/mmkv": "1.3.6", } } diff --git a/README.md b/README.md index 517d98b8..a124ac8e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![license](https://img.shields.io/badge/license-BSD_3-brightgreen.svg?style=flat)](https://github.com/Tencent/MMKV/blob/master/LICENSE.TXT) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/MMKV/pulls) -[![Release Version](https://img.shields.io/badge/release-1.3.5-brightgreen.svg)](https://github.com/Tencent/MMKV/releases) +[![Release Version](https://img.shields.io/badge/release-1.3.6-brightgreen.svg)](https://github.com/Tencent/MMKV/releases) [![Platform](https://img.shields.io/badge/Platform-%20Android%20%7C%20iOS%2FmacOS%20%7C%20Windows%20%7C%20POSIX%20%7C%20HarmonyOS%20NEXT-brightgreen.svg)](https://github.com/Tencent/MMKV/wiki/home) 中文版本请参看[这里](./README_CN.md) @@ -28,8 +28,8 @@ Add the following lines to `build.gradle` on your app module: ```gradle dependencies { - implementation 'com.tencent:mmkv:1.3.5' - // replace "1.3.5" with any available version + implementation 'com.tencent:mmkv:1.3.6' + // replace "1.3.6" with any available version } ``` diff --git a/README_CN.md b/README_CN.md index 1a339e46..a5e6cc7d 100644 --- a/README_CN.md +++ b/README_CN.md @@ -22,8 +22,8 @@ MMKV 是基于 mmap 内存映射的 key-value 组件,底层序列化/反序列 ```gradle dependencies { - implementation 'com.tencent:mmkv:1.3.5' - // replace "1.3.5" with any available version + implementation 'com.tencent:mmkv:1.3.6' + // replace "1.3.6" with any available version } ``` 更多安装指引参考 [Android Setup](https://github.com/Tencent/MMKV/wiki/android_setup_cn)。 diff --git a/flutter/mmkv/CHANGELOG.md b/flutter/mmkv/CHANGELOG.md index 9aab8f0a..3b4c3367 100644 --- a/flutter/mmkv/CHANGELOG.md +++ b/flutter/mmkv/CHANGELOG.md @@ -1,4 +1,9 @@ # MMKV for Flutter Change Log +## v1.3.6 / 2024-07-05 +* Android: MMKV will try to load libmmkv.so before Dart code, to reduce the error of loading library in Android. +* Android: Use the latest ashmem API if possible. +* Android: Use the latest API to get the device API level. + ## v1.3.5 / 2024-04-24 * Migrate to federated plugins to avoid the iOS rename headache. From now on, no more renaming from `mmkv` to `mmkvflutter` is needed. * Bump iOS Deployment Target to iOS 12. diff --git a/flutter/mmkv/example/android/app/build.gradle b/flutter/mmkv/example/android/app/build.gradle index 011394bd..3d85b057 100644 --- a/flutter/mmkv/example/android/app/build.gradle +++ b/flutter/mmkv/example/android/app/build.gradle @@ -49,7 +49,7 @@ android { } dependencies { - implementation('com.tencent:mmkv:1.3.4') + implementation('com.tencent:mmkv:1.3.6') constraints { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { diff --git a/flutter/mmkv/pubspec.yaml b/flutter/mmkv/pubspec.yaml index 56eb4b6a..e54e2c0b 100644 --- a/flutter/mmkv/pubspec.yaml +++ b/flutter/mmkv/pubspec.yaml @@ -1,6 +1,6 @@ name: mmkv description: An efficient, small mobile key-value storage framework developed by WeChat. Works on Android & iOS. -version: 1.3.5 +version: 1.3.6 homepage: https://github.com/Tencent/mmkv repository: https://github.com/Tencent/MMKV/tree/master/flutter/mmkv @@ -14,11 +14,11 @@ dependencies: path_provider: ^2.0.1 ffi: ^2.1.0 mmkv_ios: - ^1.0.1 + ^1.0.2 # path: ../mmkv_ios mmkv_android: -# ^1.0.1 - path: ../mmkv_android + ^1.0.2 +# path: ../mmkv_android mmkv_platform_interface: ^1.0.0 # path: ../mmkv_platform_interface diff --git a/flutter/mmkv_android/CHANGELOG.md b/flutter/mmkv_android/CHANGELOG.md index 48896396..dee1b33b 100644 --- a/flutter/mmkv_android/CHANGELOG.md +++ b/flutter/mmkv_android/CHANGELOG.md @@ -1,5 +1,8 @@ # MMKV Platform Android Change Log +## v1.0.2 / 2024-07-05 +Keep up with native lib v1.3.6. + ## v1.0.1 / 2024-04-24 Keep up with native lib v1.3.5. diff --git a/flutter/mmkv_android/android/build.gradle b/flutter/mmkv_android/android/build.gradle index 01717f44..7d8bb2b8 100644 --- a/flutter/mmkv_android/android/build.gradle +++ b/flutter/mmkv_android/android/build.gradle @@ -34,6 +34,6 @@ android { } dependencies { - implementation 'com.tencent:mmkv:1.3.5' + implementation 'com.tencent:mmkv:1.3.6' } } diff --git a/flutter/mmkv_android/pubspec.yaml b/flutter/mmkv_android/pubspec.yaml index a5dbb751..f6deaea7 100644 --- a/flutter/mmkv_android/pubspec.yaml +++ b/flutter/mmkv_android/pubspec.yaml @@ -1,7 +1,7 @@ name: mmkv_android description: Android platform implementation of MMKV. repository: https://github.com/Tencent/MMKV/tree/master/flutter/mmkv_ios -version: 1.0.1 +version: 1.0.2 homepage: https://github.com/Tencent/mmkv environment: diff --git a/flutter/mmkv_ios/CHANGELOG.md b/flutter/mmkv_ios/CHANGELOG.md index 786d95a9..539584ed 100644 --- a/flutter/mmkv_ios/CHANGELOG.md +++ b/flutter/mmkv_ios/CHANGELOG.md @@ -1,4 +1,7 @@ # MMKV Platform iOS Change Log +## v1.0.2 / 2024-07-05 +Keep up with native lib v1.3.6. + ## v1.0.1 / 2024-04-24 Keep up with native lib v1.3.5. diff --git a/flutter/mmkv_ios/pubspec.yaml b/flutter/mmkv_ios/pubspec.yaml index e5a854ff..510fc146 100644 --- a/flutter/mmkv_ios/pubspec.yaml +++ b/flutter/mmkv_ios/pubspec.yaml @@ -1,7 +1,7 @@ name: mmkv_ios description: iOS platform implementation of MMKV. repository: https://github.com/Tencent/MMKV/tree/master/flutter/mmkv_ios -version: 1.0.1 +version: 1.0.2 homepage: https://github.com/Tencent/mmkv environment: diff --git a/iOS/MMKV.podspec b/iOS/MMKV.podspec index 0ac55482..1cab5e84 100644 --- a/iOS/MMKV.podspec +++ b/iOS/MMKV.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MMKV" - s.version = "1.3.5" + s.version = "1.3.6" s.summary = "MMKV is a cross-platform key-value storage framework developed by WeChat." s.description = <<-DESC @@ -32,7 +32,7 @@ Pod::Spec.new do |s| "CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF" => "NO", } - s.dependency 'MMKVCore', '~> 1.3.5' + s.dependency 'MMKVCore', '~> 1.3.6' end diff --git a/iOS/MMKV/MMKV.xcodeproj/project.pbxproj b/iOS/MMKV/MMKV.xcodeproj/project.pbxproj index 3db492c5..a2ea0d07 100644 --- a/iOS/MMKV/MMKV.xcodeproj/project.pbxproj +++ b/iOS/MMKV/MMKV.xcodeproj/project.pbxproj @@ -493,7 +493,7 @@ "@loader_path/Frameworks", ); MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; - MARKETING_VERSION = 1.3.4; + MARKETING_VERSION = 1.3.6; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17"; "OTHER_LDFLAGS[sdk=iphoneos*]" = ( "-framework", @@ -539,7 +539,7 @@ "@loader_path/Frameworks", ); MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; - MARKETING_VERSION = 1.3.4; + MARKETING_VERSION = 1.3.6; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17"; "OTHER_LDFLAGS[sdk=iphoneos*]" = ( "-framework", @@ -749,7 +749,7 @@ "@loader_path/Frameworks", ); MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; - MARKETING_VERSION = 1.3.4; + MARKETING_VERSION = 1.3.6; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17"; "OTHER_LDFLAGS[sdk=iphoneos*]" = ( "-framework", @@ -794,7 +794,7 @@ "@loader_path/Frameworks", ); MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; - MARKETING_VERSION = 1.3.4; + MARKETING_VERSION = 1.3.6; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17"; "OTHER_LDFLAGS[sdk=iphoneos*]" = ( "-framework", @@ -843,7 +843,7 @@ "@loader_path/Frameworks", ); MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; - MARKETING_VERSION = 1.3.4; + MARKETING_VERSION = 1.3.6; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17"; "OTHER_LDFLAGS[sdk=iphoneos*]" = ( "-framework", @@ -891,7 +891,7 @@ "@loader_path/Frameworks", ); MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)"; - MARKETING_VERSION = 1.3.4; + MARKETING_VERSION = 1.3.6; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17"; "OTHER_LDFLAGS[sdk=iphoneos*]" = ( "-framework", diff --git a/iOS/MMKVAppExtension.podspec b/iOS/MMKVAppExtension.podspec index 991109d9..b7eb6616 100644 --- a/iOS/MMKVAppExtension.podspec +++ b/iOS/MMKVAppExtension.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MMKVAppExtension" - s.version = "1.3.5" + s.version = "1.3.6" s.summary = "MMKV is a cross-platform key-value storage framework developed by WeChat." s.module_name = "MMKVAppExtension" @@ -31,7 +31,7 @@ Pod::Spec.new do |s| "GCC_PREPROCESSOR_DEFINITIONS" => "MMKV_IOS_EXTENSION", } - s.dependency 'MMKVCore', '~> 1.3.5' + s.dependency 'MMKVCore', '~> 1.3.6' end diff --git a/iOS/MMKVCore.podspec b/iOS/MMKVCore.podspec index ada7bd00..ff093c39 100644 --- a/iOS/MMKVCore.podspec +++ b/iOS/MMKVCore.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MMKVCore" - s.version = "1.3.5" + s.version = "1.3.6" s.summary = "MMKVCore for MMKV. MMKV is a cross-platform key-value storage framework developed by WeChat." s.description = <<-DESC diff --git a/iOS/MMKVWatchExtension.podspec b/iOS/MMKVWatchExtension.podspec index cbb97b5e..6550b2ac 100644 --- a/iOS/MMKVWatchExtension.podspec +++ b/iOS/MMKVWatchExtension.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MMKVWatchExtension" - s.version = "1.3.5" + s.version = "1.3.6" s.summary = "MMKV is a cross-platform key-value storage framework developed by WeChat." s.module_name = "MMKVWatchExtension" @@ -31,7 +31,7 @@ Pod::Spec.new do |s| "GCC_PREPROCESSOR_DEFINITIONS" => "MMKV_IOS_EXTENSION", } - s.dependency 'MMKVCore', '~> 1.3.5' + s.dependency 'MMKVCore', '~> 1.3.6' end