Skip to content

Commit

Permalink
prepare for v1.2.16
Browse files Browse the repository at this point in the history
  • Loading branch information
lingol committed Apr 20, 2023
1 parent 209ad09 commit 3d0cb69
Show file tree
Hide file tree
Showing 14 changed files with 104 additions and 51 deletions.
2 changes: 1 addition & 1 deletion Android/MMKV/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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=

Expand Down
6 changes: 3 additions & 3 deletions Android/MMKV/mmkvdemo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Core/MMKVPredef.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions flutter/README.md
Original file line number Diff line number Diff line change
@@ -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**.
Expand All @@ -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'**.
Expand Down
6 changes: 3 additions & 3 deletions flutter/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 11 additions & 0 deletions flutter/example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 */
Expand Down
14 changes: 7 additions & 7 deletions flutter/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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')}');
Expand Down
31 changes: 19 additions & 12 deletions flutter/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions flutter/lib/mmkv.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Loading

0 comments on commit 3d0cb69

Please sign in to comment.