Skip to content

Commit

Permalink
Merge pull request #446 from Tencent/dev
Browse files Browse the repository at this point in the history
prepare v1.1.1
  • Loading branch information
lingol authored Apr 13, 2020
2 parents a48b44a + 8b3a4ea commit aae0c93
Show file tree
Hide file tree
Showing 62 changed files with 2,008 additions and 303 deletions.
4 changes: 2 additions & 2 deletions Android/MMKV/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.11'
ext.kotlin_version = '1.3.61'

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.android.tools.build:gradle:3.6.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'
classpath 'digital.wup:android-maven-publish:3.6.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
Expand Down
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.1.0
VERSION_NAME_PREFIX=1.1.1
#VERSION_NAME_SUFFIX=-SNAPSHOT
VERSION_NAME_SUFFIX=
6 changes: 3 additions & 3 deletions Android/MMKV/mmkvdemo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {
defaultConfig {
applicationId "com.tencent.mmkvdemo"
minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 29
versionCode 1
versionName "1.0"

Expand Down Expand Up @@ -63,8 +63,8 @@ repositories {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
// implementation project(':mmkv')
// implementation 'com.tencent:mmkv:1.1.0'
implementation 'com.tencent:mmkv-static:1.1.0'
// implementation 'com.tencent:mmkv:1.1.1'
implementation 'com.tencent:mmkv-static:1.1.1'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# MMKV Change Log

## v1.1.1 / 2020-04-13

### iOS / macOS

* Support WatchOS.
* Rename `+[MMKV onExit]` to `+[MMKV onAppTerminate]`, to avoid naming conflict with some other OpenSource projects.
* Make background write protection much more robust, fix a potential crash when writing meta info in background.
* Fix a potential data corruption bug when writing a UTF-8 (non-ASCII) key.

### Android

* Fix a crash in the demo project when the App is hot reloaded.
* Improve wiki & readme to recommend users to init & destruct MMKV in the `Application` class instead of on the `MainActivity` class.

### POSIX
* Fix two compile errors with some compilers.

## v1.1.0 / 2020-03-24
This is the first **major breaking version** ever since MMKV was made public in September 2018, introducing bunches of improvement. Due to the Covid-19, it has been delayed for about a month. Now it's finally here!

Expand Down
1 change: 0 additions & 1 deletion Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ add_library(core
CodedInputData_OSX.cpp
CodedOutputData.h
CodedOutputData.cpp
CodedOutputData_OSX.cpp
PBUtility.h
PBUtility.cpp
MiniPBCoder.h
Expand Down
10 changes: 5 additions & 5 deletions Core/CodedInputData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#include "PBUtility.h"
#include <stdexcept>

#ifdef MMKV_IOS_OR_MAC
#ifdef MMKV_APPLE
# if __has_feature(objc_arc)
# error This file must be compiled with MRC. Use -fno-objc-arc flag.
# endif
#endif // MMKV_IOS_OR_MAC
#endif // MMKV_APPLE

using namespace std;

Expand Down Expand Up @@ -79,7 +79,7 @@ bool CodedInputData::readBool() {
return this->readRawVarint32() != 0;
}

#ifndef MMKV_IOS_OR_MAC
#ifndef MMKV_APPLE

string CodedInputData::readString() {
int32_t size = readRawVarint32();
Expand Down Expand Up @@ -181,7 +181,7 @@ int8_t CodedInputData::readRawByte() {
return bytes[m_position++];
}

#ifdef MMKV_IOS_OR_MAC
#endif // MMKV_IOS_OR_MAC
#ifdef MMKV_APPLE
#endif // MMKV_APPLE

} // namespace mmkv
2 changes: 1 addition & 1 deletion Core/CodedInputData.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class CodedInputData {

MMBuffer readData();

#ifndef MMKV_IOS_OR_MAC
#ifndef MMKV_APPLE
std::string readString();
#else
NSString *readString();
Expand Down
4 changes: 2 additions & 2 deletions Core/CodedInputData_OSX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "CodedInputData.h"

#ifdef MMKV_IOS_OR_MAC
#ifdef MMKV_APPLE

# include "PBUtility.h"
# include <stdexcept>
Expand Down Expand Up @@ -68,4 +68,4 @@ NSData *CodedInputData::readNSData() {

} // namespace mmkv

#endif // MMKV_IOS_OR_MAC
#endif // MMKV_APPLE
8 changes: 4 additions & 4 deletions Core/CodedOutputData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#include <cstring>
#include <stdexcept>

#ifdef MMKV_IOS_OR_MAC
#ifdef MMKV_APPLE
# if __has_feature(objc_arc)
# error This file must be compiled with MRC. Use -fno-objc-arc flag.
# endif
#endif // MMKV_IOS_OR_MAC
#endif // MMKV_APPLE

using namespace std;

Expand Down Expand Up @@ -78,7 +78,7 @@ void CodedOutputData::writeData(const MMBuffer &value) {
this->writeRawData(value);
}

#ifndef MMKV_IOS_OR_MAC
#ifndef MMKV_APPLE

void CodedOutputData::writeString(const string &value) {
size_t numberOfBytes = value.size();
Expand All @@ -92,7 +92,7 @@ void CodedOutputData::writeString(const string &value) {
m_position += numberOfBytes;
}

#endif // MMKV_IOS_OR_MAC
#endif // MMKV_APPLE

size_t CodedOutputData::spaceLeft() {
if (m_size <= m_position) {
Expand Down
4 changes: 1 addition & 3 deletions Core/CodedOutputData.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ class CodedOutputData {

void writeData(const MMBuffer &value);

#ifndef MMKV_IOS_OR_MAC
#ifndef MMKV_APPLE
void writeString(const std::string &value);
#else
void writeString(__unsafe_unretained NSString *value);
#endif
};

Expand Down
58 changes: 0 additions & 58 deletions Core/CodedOutputData_OSX.cpp

This file was deleted.

Loading

0 comments on commit aae0c93

Please sign in to comment.