aboutsummaryrefslogtreecommitdiffstats
path: root/src/frontends/android/app/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontends/android/app/build.gradle')
-rw-r--r--src/frontends/android/app/build.gradle42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/frontends/android/app/build.gradle b/src/frontends/android/app/build.gradle
new file mode 100644
index 000000000..8280f501f
--- /dev/null
+++ b/src/frontends/android/app/build.gradle
@@ -0,0 +1,42 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 21
+ buildToolsVersion "22.0.1"
+
+ defaultConfig {
+ applicationId "org.strongswan.android"
+ minSdkVersion 15
+ targetSdkVersion 22
+ versionCode 28
+ versionName "1.5.0"
+ }
+
+ sourceSets.main {
+ jni.srcDirs = [] // disables the default ndk-build call (with on-the-fly Android.mk files)
+ jniLibs.srcDir 'src/main/libs'
+ }
+
+ task buildNative(type: Exec) {
+ workingDir 'src/main/jni'
+ commandLine "${android.ndkDirectory}/ndk-build", '-j', Runtime.runtime.availableProcessors()
+ }
+
+ task cleanNative(type: Exec) {
+ workingDir 'src/main/jni'
+ commandLine "${android.ndkDirectory}/ndk-build", 'clean'
+ }
+
+ tasks.withType(JavaCompile) {
+ compileTask -> compileTask.dependsOn buildNative
+ }
+
+ clean.dependsOn 'cleanNative'
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
+ }
+ }
+}