Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
Providing 64-bit ABIs & updating tools
Browse files Browse the repository at this point in the history
  • Loading branch information
nhachicha committed Apr 14, 2015
1 parent f230927 commit c89df9b
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 36 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Change Log
==========

Version 0.5.1 *(2015-04-15)*
----------------------------
* Providing 64-bit ABIs

* Targeting android-9 as minSdk (NDK)

* Update build tools: Gradle "2.2", Android plugin "1.1.3", compileSdkVersion "22", buildToolsVersion "22.0.1"


Version 0.5.0 *(2014-10-14)*
----------------------------
* Add offset & limit for keys search operations
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:0.13.+'
classpath 'com.android.tools.build:gradle:1.1.3'
}
}

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Oct 11 18:08:06 BST 2014
#Wed Apr 15 00:08:41 BST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-all.zip
17 changes: 9 additions & 8 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ apply plugin: 'maven'
apply plugin: 'signing'

group = 'com.snappydb'
version = '0.5.0'
version = '0.5.1'
ext.packaging = 'aar'
def artifact_id = 'snappydb-lib'
def sonatypeRepositoryUrl

android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
minSdkVersion 9
targetSdkVersion 19
versionCode 4
targetSdkVersion 22
versionCode 5
versionName version
}

Expand All @@ -30,7 +30,7 @@ android {
jni.srcDirs = [] //disable automatic ndk-build call
}

buildTypes.debug.jniDebugBuild !false
buildTypes.debug.jniDebuggable false

// call regular ndk-build script from app directory
task ndkBuild(type: Exec) {
Expand Down Expand Up @@ -59,7 +59,7 @@ dependencies {
}

task wrapper(type: Wrapper) {
gradleVersion = '2.1'
gradleVersion = '2.2'
}


Expand All @@ -80,6 +80,7 @@ task androidJavadocs(type: Javadoc) {
linksOffline "http://d.android.com/reference", "${android.sdkDirectory}/docs/reference"

}
failOnError false
source = "src/main/java"
classpath += project.files(project.android.getBootClasspath().join(File.pathSeparator))
}
Expand Down Expand Up @@ -153,5 +154,5 @@ def isSnapshotBuild() {
}

def getNdkPath () {
System.env.ANDROID_NDK_HOME?:"/Android/android-ndk-r9"
System.env.ANDROID_NDK_HOME?:"/Android/android-ndk-r10d"
}
Binary file modified library/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions library/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Oct 11 18:26:25 BST 2014
#Wed Apr 15 00:00:22 BST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-bin.zip
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import java.util.BitSet;
import java.util.GregorianCalendar;
import java.util.concurrent.atomic.AtomicInteger;

import java.util.*;
import de.javakaffee.kryoserializers.BitSetSerializer;
import de.javakaffee.kryoserializers.GregorianCalendarSerializer;

Expand Down Expand Up @@ -873,6 +873,25 @@ public void testObjectArray() throws SnappydbException {

}

@SmallTest
public void testObjectList() throws SnappydbException {
snappyDB = DBFactory.open(getContext(), dbName);
List<Book> books = new ArrayList<>(3);
books.add(new Book("Echo Burning", "0-399-14726-8"));
books.add(new Book("Nothing To Lose", "0-593-05702-3"));
books.add(new Book("61 Hours", "978-0-593-05706-3"));

snappyDB.put("books", books);

ArrayList<Book> mySavedBooks = (ArrayList<Book>) snappyDB.getObject("books", ArrayList.class);

assertNotNull(mySavedBooks);
assertEquals(mySavedBooks.size(), books.size());
assertEquals(books.get(0).hashCode(), mySavedBooks.get(0).hashCode());
assertEquals(books.get(1).hashCode(), mySavedBooks.get(1).hashCode());
assertEquals(books.get(2).hashCode(), mySavedBooks.get(2).hashCode());
}

@SmallTest
public void testKeyIterator() throws SnappydbException, IOException {
snappyDB = DBFactory.open(getContext(), dbName);
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_PLATFORM := android-8
APP_PLATFORM := android-9
APP_ABI := all
APP_STL := gnustl_static
LOCAL_CPPFLAGS := -std=c++11 −fexceptions
4 changes: 0 additions & 4 deletions library/src/main/jni/port/port_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ size_t fwrite_unlocked(const void *a, size_t b, size_t c, FILE *d) {
int fflush_unlocked(FILE *f) {
return fflush(f);
}

int fdatasync(int fd) {
return fsync(fd);
}
}

namespace leveldb {
Expand Down
7 changes: 0 additions & 7 deletions library/src/main/jni/port/port_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <endian.h>
#include <pthread.h>
#include <stdint.h>
//#include <cstdatomic>
#include <atomic>
#include <string>
#include <cctype>
Expand All @@ -22,12 +21,6 @@
// See http://code.google.com/p/android/issues/detail?id=39824
#define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)

#if defined(OS_ANDROID) && __ANDROID_API__ < 9
// fdatasync() was only introduced in API level 9 on Android. Use fsync()
// when targetting older platforms.
#define fdatasync fsync
#endif


// Collapse the plethora of ARM flavors available to an easier to manage set
// Defs reference is at https://wiki.edubuntu.org/ARM/Thumb2PortingHowto
Expand Down
18 changes: 9 additions & 9 deletions snappydb-snippets/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ buildscript {
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.13.+'
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
classpath 'com.android.tools.build:gradle:1.1.3'
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.16.0'
}
}

Expand All @@ -18,13 +18,13 @@ apply plugin: 'com.android.application'
apply plugin: 'crashlytics'

android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "com.snappydb.snippets.app"
minSdkVersion 9
targetSdkVersion 19
targetSdkVersion 22
versionCode 2
versionName "1.1"
}
Expand All @@ -36,7 +36,7 @@ android {

buildTypes {
release {
runProguard false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
Expand All @@ -51,8 +51,8 @@ android {
dependencies {
compile 'com.snappydb:snappydb-lib:0.4.0'
compile 'com.esotericsoftware.kryo:kryo:2.24.0'
compile 'com.android.support:appcompat-v7:20.0.0'
compile 'com.crashlytics.android:crashlytics:1.+'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.crashlytics.android:crashlytics:1.1.13'
}

File propFile = file('signing.properties');
Expand All @@ -75,5 +75,5 @@ if (propFile.exists()) {


task wrapper(type: Wrapper) {
gradleVersion = '2.1'
gradleVersion = '2.2'
}
2 changes: 1 addition & 1 deletion snappydb-snippets/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-bin.zip

0 comments on commit c89df9b

Please sign in to comment.