summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-05-25 19:15:58 +0200
committerArne Schwabe <arne@rfc2549.org>2013-05-25 19:15:58 +0200
commita5023ab2a6c00fa8ef6dfc6d58329e0886e0e1c1 (patch)
treecd3ca0d293aeeca107be3420c9f4dce9a9674d63
parent9ea8c8a18a4e02531df8acb87ad12a578805ee37 (diff)
Allow project to be build with gradle
-rw-r--r--.hgignore5
-rwxr-xr-xbuild-native.sh11
-rw-r--r--build.gradle17
3 files changed, 31 insertions, 2 deletions
diff --git a/.hgignore b/.hgignore
index cc384808..1e1452b5 100644
--- a/.hgignore
+++ b/.hgignore
@@ -2,6 +2,7 @@ obj
bin
libs
gen
+build
openvpn/.git
openvpn/autom4te.cache
openvpn/aclocal.m4
@@ -67,4 +68,6 @@ ovpn3/boost
polarssl
local.properties
proguard-project.txt
-build.xml \ No newline at end of file
+build.xml
+cache.properties
+.gradle \ No newline at end of file
diff --git a/build-native.sh b/build-native.sh
index 4e93e928..72ecd1cb 100755
--- a/build-native.sh
+++ b/build-native.sh
@@ -1,5 +1,7 @@
ndk-build APP_API=all -j 8
if [ $? = 0 ]; then
+ rm -rf build/native-libs/
+
cd libs
mkdir -p ../assets
for i in *
@@ -8,5 +10,12 @@ if [ $? = 0 ]; then
done
# Removed compiled openssl libs, will use platform so libs
# Reduces size of apk
- rm -v */libcrypto.so */libssl.so
+ rm -v */libcrypto.so */libssl.so
+
+ for arch in *
+ do
+ builddir=../build/native-libs/$arch
+ mkdir -p $builddir
+ cp -v $arch/*.so $builddir
+ done
fi
diff --git a/build.gradle b/build.gradle
index 9e6e9415..04ade8a9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -33,4 +33,21 @@ android {
instrumentTest.setRoot('tests')
}
+
+ signingConfigs {
+ release {
+ storeFile file("/Users/arne/software/android.keystore")
+ storePassword "$System.env.ICSOPENVPNSIGNPW"
+ keyAlias "singkey"
+ keyPassword "$System.env.ICSOPENVPNSIGNPW"
+ }
+ }
}
+
+//http://stackoverflow.com/questions/16683775/include-so-library-in-apk-in-android-studio
+
+tasks.withType(com.android.build.gradle.tasks.PackageApplication) { pkgTask ->
+ pkgTask.jniDir new File(buildDir, 'native-libs')
+}
+
+clean.dependsOn 'cleanCopyNativeLibs' \ No newline at end of file