diff app/build.gradle @ 438:d29cce60f393

migrate from Eclipse to Android Studio
author Carl Byington <carl@five-ten-sg.com>
date Thu, 03 Dec 2015 11:23:55 -0800
parents
children 1e3789de6900
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/build.gradle	Thu Dec 03 11:23:55 2015 -0800
@@ -0,0 +1,75 @@
+tasks.whenTaskAdded { task ->
+    if (task.name.contains("lint")) {
+        task.enabled = false
+    }
+}
+
+apply plugin: 'com.android.model.application'
+
+model {
+    def signConf
+
+    android {
+        compileSdkVersion = 16
+        buildToolsVersion = "23.0.2"
+
+        defaultConfig.with {
+            applicationId = "com.five_ten_sg.connectbot"
+            minSdkVersion.apiLevel = 8
+            targetSdkVersion.apiLevel = 15
+        }
+    }
+
+    compileOptions.with {
+        sourceCompatibility = JavaVersion.VERSION_1_7
+        targetCompatibility = JavaVersion.VERSION_1_7
+    }
+
+    android.ndk {
+        moduleName = "com_google_ase_Exec"
+        cppFlags.add("-Werror")
+        ldLibs.add("log")
+    }
+
+    android.sources {
+        main {
+            jni {
+                source {
+                    srcDir "Exec"
+                }
+            }
+        }
+    }
+
+    android.signingConfigs {
+        create("signed") {
+            storeFile = file("../510Connectbot.keystore")
+            storePassword = new String(System.console().readPassword("\n\$ Enter keystore password: "))
+            storeType = "jks"
+            keyAlias = "510Connectbot"
+            keyPassword = new String(System.console().readPassword("\n\$ Enter key password: "))
+            signConf = it
+        }
+    }
+
+    android.buildTypes {
+        release {
+            minifyEnabled = false
+            signingConfig = signConf
+            //proguardFiles.add(file('proguard-rules.txt'))
+        }
+        debug {
+            debuggable = true
+        }
+    }
+
+    android.productFlavors {
+        create("arm") {
+            ndk.abiFilters.add("armeabi")
+        }
+        create("x86") {
+            ndk.abiFilters.add("x86")
+        }
+    }
+
+}