summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-03-06 17:56:42 +0100
committerArne Schwabe <arne@rfc2549.org>2014-03-06 17:56:42 +0100
commit183fa39cb87ae3d31ee07ef81049cbb7611a4683 (patch)
tree98f95fc2738e41563855c713048ffc1b175b28e3
parent679fb75a33d32ebe86696d6d29073c947fced6d7 (diff)
Add gradle code to build variants for different abis
-rw-r--r--doc/README.txt2
-rw-r--r--main/build.gradle38
2 files changed, 37 insertions, 3 deletions
diff --git a/doc/README.txt b/doc/README.txt
index 4e39f72b..2127689a 100644
--- a/doc/README.txt
+++ b/doc/README.txt
@@ -3,7 +3,7 @@ ATTENTION
Before doing anything please read the first FAQ point in this file, espically if
you planing to build commercial software from this client. Also make sure you
understand the licenses of the code. OpenVPN for Android is GPL licensed. You
-_CANNOT_ build a closed sourced custom UI application whithout acquiring a different
+_CANNOT_ build a closed sourced custom UI application without acquiring a different
(paid) license for UI code.
When in doubt mail me about it.
diff --git a/main/build.gradle b/main/build.gradle
index e927e12c..1cd8b384 100644
--- a/main/build.gradle
+++ b/main/build.gradle
@@ -30,12 +30,12 @@ android {
sourceSets {
main {
- assets.srcDirs = ['src/main/assets', 'ovpnlibs/assets']
+ assets.srcDirs = ['src/main/assets', 'ovpnlibs/assets']
jniLibs.srcDirs = ['ovpnlibs/jniLibs']
jni.srcDirs = [] //disable automatic ndk-build
}
}
-
+
/*
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
@@ -56,6 +56,40 @@ android {
signingConfig signingConfigs.release
}
}
+
+
+ productFlavors {
+ x86 {
+ versionCode Integer.parseInt("6" + defaultConfig.versionCode)
+ ndk {
+ abiFilter "x86"
+ }
+ }
+
+ mips {
+ versionCode Integer.parseInt("4" + defaultConfig.versionCode)
+ ndk {
+ abiFilter "mips"
+ }
+ }
+
+ armv7 {
+ versionCode Integer.parseInt("2" + defaultConfig.versionCode)
+ ndk {
+ abiFilter "armeabi-v7a"
+ }
+ }
+
+ arm {
+ versionCode Integer.parseInt("1" + defaultConfig.versionCode)
+ ndk {
+ abiFilter "armeabi"
+ }
+ }
+
+ fat
+ }
+
}
// ~/.gradle/gradle.properties