prepare for v1.2.16

This commit is contained in:
guoling
2023-04-20 16:20:11 +08:00
parent 209ad09cff
commit 3d0cb69aa4
14 changed files with 104 additions and 51 deletions
+1 -1
View File
@@ -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.2.15
VERSION_NAME_PREFIX=1.2.16
#VERSION_NAME_SUFFIX=-SNAPSHOT
VERSION_NAME_SUFFIX=
+3 -3
View File
@@ -76,9 +76,9 @@ repositories {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':mmkv')
// implementation 'com.tencent:mmkv:1.2.15'
// implementation 'com.tencent:mmkv-static:1.2.15' // this is identical to 'com.tencent:mmkv'
// implementation 'com.tencent:mmkv-shared:1.2.15'
// implementation 'com.tencent:mmkv:1.2.16'
// implementation 'com.tencent:mmkv-static:1.2.16' // this is identical to 'com.tencent:mmkv'
// implementation 'com.tencent:mmkv-shared:1.2.16'
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
+19
View File
@@ -1,5 +1,24 @@
# MMKV Change Log
## v1.2.16 / 2023-04-20
### Changes for All platforms
* Optimization: The actual file content is lazy loaded now, saving time on MMKV instance creation, and avoiding lock waiting when a lot of instances are created at the same time.
* Fix a bug when restoring a loaded MMKV instance the meta file might mistakenly report corrupted.
### Android
* Optimization: Remove unnecessary binder call on main process instantiation.
### Flutter
* Fix a crash on decoding an empty list.
* Remove deprecated dependence.
* Make the script more robust to fix the iOS Flutter plugin name.
### Win32
* Fix a string format bug on the MinGW64 environment.
### golang
* Fix a build error on 32-bit OS.
## v1.2.15 / 2023-01-12
### Changes for All platforms
* Log handler now handles all logs from the very beginning, especially the logs in initialization.
+1 -1
View File
@@ -34,7 +34,7 @@
#include <vector>
#include <unordered_map>
constexpr auto MMKV_VERSION = "v1.2.15";
constexpr auto MMKV_VERSION = "v1.2.16";
#ifdef DEBUG
# define MMKV_DEBUG
+8
View File
@@ -1,5 +1,13 @@
# MMKV for Flutter Change Log
## v1.2.17 / 2023-04-20
* Optimization: The actual file content is lazy loaded now, saving time on MMKV instance creation, and avoiding lock waiting when a lot of instances are created at the same time.
* Fix a bug when restoring a loaded MMKV instance the meta file might mistakenly report corrupted.
* Fix a crash on decoding an empty list.
* Remove deprecated dependence.
* Make the script more robust to fix the iOS Flutter plugin name.
* Keep up with MMKV native lib v1.2.16.
## v1.2.16 / 2023-01-12
* Reduce the privacy info needed to obtain android sdkInt, avoid unnecessary risk on Android App Review.
* Log handler now handles all logs from the very beginning, especially the logs in initialization.
+3 -3
View File
@@ -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.2.16-brightgreen.svg)](https://github.com/Tencent/MMKV/releases)
[![Release Version](https://img.shields.io/badge/release-1.2.17-brightgreen.svg)](https://github.com/Tencent/MMKV/releases)
[![Platform](https://img.shields.io/badge/Platform-%20Android%20%7C%20iOS-brightgreen.svg)](https://github.com/Tencent/MMKV/wiki/home)
MMKV is an **efficient**, **small**, **easy-to-use** mobile key-value storage framework used in the WeChat application. It's currently available on **Android** and **iOS**.
@@ -26,11 +26,11 @@ Add the following lines to `pubspec.yaml` on your app module. Then run `flutter
```yaml
dependencies:
mmkv: ">=1.2.16"
mmkv: ">=1.2.17"
...
```
If you already include MMKV native lib in your App, you need to upgrade to version newer than v1.2.15.
If you already include MMKV native lib in your App, you need to upgrade to version newer than v1.2.16.
#### iOS
To avoid conflict of the native lib name 'libMMKV.so' on iOS, we need to **change the plugin name 'mmkv' to 'mmkvflutter'**.
+3 -3
View File
@@ -28,12 +28,12 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider_ios/ios"
SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
MMKV: 7f34558bbb5a33b0eaefae2de4b6a20a2ffdad6f
MMKVCore: ddf41b9d9262f058419f9ba7598719af56c02cd3
mmkvflutter: adff7ed724316d0cea22d65b59f43d467fc57403
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
PODFILE CHECKSUM: 2acd6b65862dca90667a4e676cf781dbf247bef7
PODFILE CHECKSUM: 751e522a1d35e86af4f588d982f4a515941611c5
COCOAPODS: 1.11.3
COCOAPODS: 1.11.2
@@ -146,6 +146,7 @@
buildPhases = (
19FB7C13A6F154DB79BFE09E /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
DBADF7DE4086731B8B058FA4 /* [CP-User] Fix MMKV Plugin Name */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
@@ -258,6 +259,16 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
};
DBADF7DE4086731B8B058FA4 /* [CP-User] Fix MMKV Plugin Name */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
name = "[CP-User] Fix MMKV Plugin Name";
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "sed -i \"\" \"s/@import mmkv;/@import mmkvflutter;/g\" ${SRCROOT}/Runner/GeneratedPluginRegistrant.m";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+7 -7
View File
@@ -18,10 +18,10 @@
* limitations under the License.
*/
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import "dart:async";
import "dart:convert";
import "dart:io";
import "dart:typed_data";
import "package:flutter/material.dart";
import "package:mmkv/mmkv.dart";
@@ -140,21 +140,21 @@ class _MyAppState extends State<MyApp> {
final list = Uint8List(0);
final buffer = MMBuffer.fromList(list)!;
const key = 'empty_bytes';
const key = "empty_bytes";
mmkv.encodeBytes(key, buffer);
buffer.destroy();
String bytesA;
final result = mmkv.decodeBytes(key);
if (result == null) {
bytesA = 'decodeBytes is null';
bytesA = "decodeBytes is null";
} else {
// bytes = result.takeList().toString();
final listA = result.asList();
bytesA = listA.toString();
result.destroy();
}
print('$key = $bytesA');
print("$key = $bytesA");
}
print('contains "bool": ${mmkv.containsKey('bool')}');
+19 -12
View File
@@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.9.0"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
@@ -21,14 +21,21 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
version: "1.1.0"
collection:
dependency: transitive
description:
@@ -49,7 +56,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
version: "1.3.0"
ffi:
dependency: transitive
description:
@@ -80,21 +87,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.12"
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5"
version: "0.1.4"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.7.0"
mmkv:
dependency: "direct main"
description:
@@ -108,7 +115,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
version: "1.8.1"
path_provider:
dependency: "direct main"
description:
@@ -190,7 +197,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.0"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
@@ -211,21 +218,21 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.12"
version: "0.4.9"
vector_math:
dependency: transitive
description:
+1
View File
@@ -22,6 +22,7 @@ import "dart:async";
import "dart:convert";
import "dart:ffi"; // For FFI
import "dart:io"; // For Platform.isX
import "dart:typed_data";
import "package:ffi/ffi.dart";
import "package:flutter/cupertino.dart";
+21 -14
View File
@@ -28,7 +28,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.9.0"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
@@ -42,14 +42,21 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
version: "1.2.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
version: "1.1.0"
collection:
dependency: transitive
description:
@@ -84,7 +91,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
version: "1.3.0"
ffi:
dependency: "direct main"
description:
@@ -178,21 +185,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.12"
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5"
version: "0.1.4"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.7.0"
mime:
dependency: transitive
description:
@@ -220,7 +227,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
version: "1.8.1"
path_provider:
dependency: "direct main"
description:
@@ -358,7 +365,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.0"
version: "1.8.2"
stack_trace:
dependency: transitive
description:
@@ -379,35 +386,35 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
version: "1.2.0"
test:
dependency: "direct dev"
description:
name: test
url: "https://pub.dartlang.org"
source: hosted
version: "1.21.4"
version: "1.21.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.12"
version: "0.4.9"
test_core:
dependency: transitive
description:
name: test_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.16"
version: "0.4.13"
typed_data:
dependency: transitive
description:
+1 -1
View File
@@ -1,6 +1,6 @@
name: mmkv
description: An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.
version: 1.2.16
version: 1.2.17
homepage: https://github.com/Tencent/mmkv
environment:
+6 -6
View File
@@ -486,7 +486,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.9;
MARKETING_VERSION = 1.2.15;
MARKETING_VERSION = 1.2.16;
"OTHER_LDFLAGS[sdk=iphoneos*]" = (
"-framework",
UIKit,
@@ -529,7 +529,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.9;
MARKETING_VERSION = 1.2.15;
MARKETING_VERSION = 1.2.16;
"OTHER_LDFLAGS[sdk=iphoneos*]" = (
"-framework",
UIKit,
@@ -728,7 +728,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.9;
MARKETING_VERSION = 1.2.15;
MARKETING_VERSION = 1.2.16;
"OTHER_LDFLAGS[sdk=iphoneos*]" = (
"-framework",
UIKit,
@@ -766,7 +766,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.9;
MARKETING_VERSION = 1.2.15;
MARKETING_VERSION = 1.2.16;
"OTHER_LDFLAGS[sdk=iphoneos*]" = (
"-framework",
UIKit,
@@ -811,7 +811,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.9;
MARKETING_VERSION = 1.2.15;
MARKETING_VERSION = 1.2.16;
"OTHER_LDFLAGS[sdk=iphoneos*]" = (
"-framework",
UIKit,
@@ -858,7 +858,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.9;
MARKETING_VERSION = 1.2.15;
MARKETING_VERSION = 1.2.16;
"OTHER_LDFLAGS[sdk=iphoneos*]" = (
"-framework",
UIKit,