summaryrefslogtreecommitdiff
path: root/app/build.gradle
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-12-15 16:22:58 +0100
committerParménides GV <parmegv@sdf.org>2014-12-15 16:22:58 +0100
commit18fef7c99aa36b3e5622b3865f36d78d0879e92d (patch)
tree7a04fc87318d5008bbc1f1ac145ebb505bb5238c /app/build.gradle
parent56fe0400b8983ce57112ed5a0f993985a87741c0 (diff)
parent33c5958a18599267820f73b151d8161d83f93d88 (diff)
Merge branch 'research/Test-on-Android-5-#6543' into develop
Diffstat (limited to 'app/build.gradle')
-rw-r--r--app/build.gradle67
1 files changed, 39 insertions, 28 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 4211e379..7d6d0a2c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -2,15 +2,8 @@ apply plugin: 'android'
//import org.ajoberstar.grgit.*
android {
- compileSdkVersion 19
- buildToolsVersion "20"
-
- defaultConfig {
- minSdkVersion 14
- targetSdkVersion 19
-
- testInstrumentationRunner "android.test.InstrumentationTestRunner"
- }
+ compileSdkVersion 21
+ buildToolsVersion "21.1.2"
signingConfigs {
release {
@@ -67,18 +60,10 @@ task checkoutStrippedIcsOpenVPN ( type: Copy ) {
into '../ics-openvpn-stripped'
}
-task copyIcsOpenVPNClasses( type: Copy, dependsOn: 'checkoutStrippedIcsOpenVPN' ) {
+task copyIcsOpenVPNClasses( type: Copy ) {
from ('../ics-openvpn-stripped/main/') {
include '**/*.java'
include '**/*.aidl'
- include '**/strings.xml'
- include '**/log_*.xml'
- include '**/vpnstatus.xml'
- include '**/styles.xml'
- include '**/dimens.xml'
- include '**/logmenu.xml'
-
- rename 'strings.xml', 'strings-icsopenvpn.xml'
filter {
line -> line.replaceAll('de.blinkt.openvpn.R', 'se.leap.bitmaskclient.R')
}
@@ -91,14 +76,45 @@ task copyIcsOpenVPNClasses( type: Copy, dependsOn: 'checkoutStrippedIcsOpenVPN'
filter {
line -> line.replace('package de.blinkt.openvpn.fragments;', 'package de.blinkt.openvpn.fragments;\n\nimport se.leap.bitmaskclient.R;')
}
+ } into '.'
+}
+
+task copyIcsOpenVPNXml( type: Copy ) {
+ from ('../ics-openvpn-stripped/main/') {
+ include '**/strings.xml'
+ include '**/log_*.xml'
+ include '**/vpnstatus.xml'
+ include '**/styles.xml'
+ include '**/dimens.xml'
+ include '**/refs.xml'
+ include '**/colours.xml'
+ include '**/logmenu.xml'
+
+ rename 'strings.xml', 'strings-icsopenvpn.xml'
filter {
line -> line.replaceAll('.*name="app".*', '')
}
} into '.'
}
+task copyIcsOpenVPNImages( type: Copy ) {
+ from ('../ics-openvpn-stripped/main/') {
+ include '**/ic_filter*.png'
+ include '**/ic_delete*.png'
+ include '**/ic_share*.png'
+ include '**/ic_close*.png'
+ include '**/ic_edit*.png'
+ } into '.'
+}
+
+task copyIcsOpenVPNFiles( type: Copy, dependsOn: 'checkoutStrippedIcsOpenVPN' ) {
+ copyIcsOpenVPNClasses.execute()
+ copyIcsOpenVPNXml.execute()
+ copyIcsOpenVPNImages.execute()
+}
+
// thanks to http://pleac.sourceforge.net/pleac_groovy/fileaccess.html
-task removeDuplicatedStrings( dependsOn: 'copyIcsOpenVPNClasses' ) << {
+task removeDuplicatedStrings( dependsOn: 'copyIcsOpenVPNFiles' ) << {
new File('app').eachFileRecurse {
if(it.name.equals('strings.xml')) {
def ics_openvpn_file = file(it.absolutePath.replace('strings.xml', 'strings-icsopenvpn.xml'))
@@ -148,9 +164,10 @@ task mergeUntranslatable( type: Copy, dependsOn: 'removeDuplicatedStrings') {
delete ics_openvpn_untranslatable
}
-task updateIcsOpenVpn( type: Copy, dependsOn: 'mergeUntranslatable') {
- from('../ics-openvpn-stripped/main') {
+task updateIcsOpenVpn( type: Copy, dependsOn: 'mergeUntranslatable') << {
+ from('../ics-openvpn-stripped/main/src/') {
include 'openvpn/**'
+ include 'openssl/**'
include 'lzo/**'
include 'jni/**'
include 'misc/**'
@@ -160,13 +177,7 @@ task updateIcsOpenVpn( type: Copy, dependsOn: 'mergeUntranslatable') {
}
task buildNative ( type: Exec ) {
-
commandLine 'sh', 'misc/build-native.sh', 'USE_BREAKPAD=0', '-j 8'
}
-preBuild.dependsOn buildNative
-
-//assembleRelease.dependsOn connectedCheck
-afterEvaluate {
- //installRelease.dependsOn connectedCheck
-}
+preBuild.dependsOn buildNative \ No newline at end of file