Skip to content

Commit

Permalink
prepare for v1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
lingol committed Oct 21, 2020
1 parent edb4d7f commit 193d77e
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Android/MMKV/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ 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.3
VERSION_NAME_PREFIX=1.2.4
#VERSION_NAME_SUFFIX=-SNAPSHOT
VERSION_NAME_SUFFIX=
4 changes: 2 additions & 2 deletions Android/MMKV/mmkv/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apply from: rootProject.file('gradle/build_library.gradle')

android {
// defaultPublishConfig "StaticCppRelease"
defaultPublishConfig "SharedCppRelease"
defaultPublishConfig "StaticCppRelease"
// defaultPublishConfig "SharedCppRelease"
defaultConfig {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
Expand Down
4 changes: 2 additions & 2 deletions Android/MMKV/mmkvdemo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ repositories {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':mmkv')
// implementation 'com.tencent:mmkv:1.2.3'
// implementation 'com.tencent:mmkv-static:1.2.3'
// implementation 'com.tencent:mmkv:1.2.4'
// implementation 'com.tencent:mmkv-static:1.2.4'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
testImplementation 'junit:junit:4.12'
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# MMKV Change Log

## v1.2.4 / 2020-10-21
This is a hotfix mainly for iOS.

### iOS / macOS
* Fix a decode error of encrypted MMKV on some devices.

### Android
* Fix a potential issue on checking `rootDir` in multi-thread while MMKV initialization is not finished.

## v1.2.3 / 2020-10-16
### Changes for All platforms
* Fix a potential crash on 32-bit devices due to pointer alignment issue.
Expand Down
2 changes: 1 addition & 1 deletion Core/KeyValueHolder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ MMBuffer KeyValueHolderCrypt::toMMBuffer(const void *basePtr, const AESCrypt *cr

} // namespace mmkv

#if !defined(MMKV_DISABLE_CRYPT) && !defined(NDEBUG)
#if !defined(MMKV_DISABLE_CRYPT) && defined(MMKV_DEBUG)
# include "CodedInputData.h"
# include "CodedOutputData.h"
# include "MMKVLog.h"
Expand Down
2 changes: 1 addition & 1 deletion Core/KeyValueHolder.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ struct KeyValueHolderCrypt {
explicit KeyValueHolderCrypt(const KeyValueHolderCrypt &other) = delete;
KeyValueHolderCrypt &operator=(const KeyValueHolderCrypt &other) = delete;

#ifndef NDEBUG
#ifdef MMKV_DEBUG
static void testAESToMMBuffer();
#endif
};
Expand Down
2 changes: 1 addition & 1 deletion Core/MMKV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ void initialize() {
# endif // MMKV_USE_ARMV8_CRC32
#endif // __aarch64__ && defined(__linux__)

#if !defined(NDEBUG) && !defined(MMKV_DISABLE_CRYPT)
#if defined(MMKV_DEBUG) && !defined(MMKV_DISABLE_CRYPT)
AESCrypt::testAESCrypt();
KeyValueHolderCrypt::testAESToMMBuffer();
#endif
Expand Down
2 changes: 1 addition & 1 deletion Core/MMKVLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

MMKV_NAMESPACE_BEGIN

#ifndef NDEBUG
#ifdef MMKV_DEBUG
MMKVLogLevel g_currentLogLevel = MMKVLogDebug;
#else
MMKVLogLevel g_currentLogLevel = MMKVLogInfo;
Expand Down
2 changes: 1 addition & 1 deletion Core/MMKVLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ extern mmkv::LogHandler g_logHandler;
# define MMKVInfo(format, ...) \
_MMKVLogWithLevel(MMKV_NAMESPACE_PREFIX::MMKVLogInfo, __FILE__, __func__, __LINE__, format, ##__VA_ARGS__)

# ifndef NDEBUG
# ifdef MMKV_DEBUG
# define MMKVDebug(format, ...) \
_MMKVLogWithLevel(MMKV_NAMESPACE_PREFIX::MMKVLogDebug, __FILE__, __func__, __LINE__, format, ##__VA_ARGS__)
# else
Expand Down
12 changes: 10 additions & 2 deletions Core/MMKVPredef.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@
#include <vector>
#include <unordered_map>

constexpr auto MMKV_VERSION = "v1.2.2";
constexpr auto MMKV_VERSION = "v1.2.4";

#ifdef DEBUG
# define MMKV_DEBUG
#endif

#ifdef NDEBUG
# undef MMKV_DEBUG
#endif

#ifdef __ANDROID__
# define MMKV_ANDROID
Expand Down Expand Up @@ -186,7 +194,7 @@ constexpr size_t AES_KEY_BITSET_LEN = 128;

} // namespace mmkv

#ifndef NDEBUG
#ifdef MMKV_DEBUG
# include <cassert>
# define MMKV_ASSERT(var) assert(var)
#else
Expand Down
4 changes: 2 additions & 2 deletions Core/aes/AESCrypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ AESCrypt AESCrypt::cloneWithStatus(const AESCryptStatus &status) const {

} // namespace mmkv

# ifndef NDEBUG
# ifdef MMKV_DEBUG

# include "../MMKVLog.h"
# include "../MemoryFile.h"
Expand Down Expand Up @@ -252,5 +252,5 @@ void AESCrypt::testAESCrypt() {

} // namespace mmkv

# endif // NDEBUG
# endif // MMKV_DEBUG
#endif // MMKV_DISABLE_CRYPT
2 changes: 1 addition & 1 deletion Core/aes/AESCrypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class AESCrypt {

friend CodedInputDataCrypt;

#ifndef NDEBUG
#ifdef MMKV_DEBUG
// check if AESCrypt is encrypt-decrypt full-duplex
static void testAESCrypt();
#endif
Expand Down
6 changes: 3 additions & 3 deletions 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.3-brightgreen.svg)](https://github.com/Tencent/MMKV/releases)
[![Release Version](https://img.shields.io/badge/release-1.2.4-brightgreen.svg)](https://github.com/Tencent/MMKV/releases)
[![Platform](https://img.shields.io/badge/Platform-%20Android%20%7C%20iOS%2FmacOS%20%7C%20Win32%20%7C%20POSIX-brightgreen.svg)](https://github.com/Tencent/MMKV/wiki/home)

中文版本请参看[这里](./readme_cn.md)
Expand Down Expand Up @@ -28,8 +28,8 @@ Add the following lines to `build.gradle` on your app module:

```gradle
dependencies {
implementation 'com.tencent:mmkv-static:1.2.3'
// replace "1.2.3" with any available version
implementation 'com.tencent:mmkv-static:1.2.4'
// replace "1.2.4" with any available version
}
```

Expand Down
12 changes: 6 additions & 6 deletions iOS/MMKV/MMKV.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,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.3;
MARKETING_VERSION = 1.2.4;
"OTHER_LDFLAGS[sdk=iphoneos*]" = (
"-framework",
UIKit,
Expand Down Expand Up @@ -531,7 +531,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.3;
MARKETING_VERSION = 1.2.4;
"OTHER_LDFLAGS[sdk=iphoneos*]" = (
"-framework",
UIKit,
Expand Down Expand Up @@ -742,7 +742,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.3;
MARKETING_VERSION = 1.2.4;
"OTHER_LDFLAGS[sdk=iphoneos*]" = (
"-framework",
UIKit,
Expand Down Expand Up @@ -782,7 +782,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.3;
MARKETING_VERSION = 1.2.4;
"OTHER_LDFLAGS[sdk=iphoneos*]" = (
"-framework",
UIKit,
Expand Down Expand Up @@ -829,7 +829,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.3;
MARKETING_VERSION = 1.2.4;
"OTHER_LDFLAGS[sdk=iphoneos*]" = (
"-framework",
UIKit,
Expand Down Expand Up @@ -878,7 +878,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.3;
MARKETING_VERSION = 1.2.4;
"OTHER_LDFLAGS[sdk=iphoneos*]" = (
"-framework",
UIKit,
Expand Down
4 changes: 2 additions & 2 deletions readme_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ MMKV 是基于 mmap 内存映射的 key-value 组件,底层序列化/反序列

```gradle
dependencies {
implementation 'com.tencent:mmkv-static:1.2.3'
// replace "1.2.3" with any available version
implementation 'com.tencent:mmkv-static:1.2.4'
// replace "1.2.4" with any available version
}
```

Expand Down

0 comments on commit 193d77e

Please sign in to comment.