diff options
Diffstat (limited to 'app/build.gradle')
-rw-r--r-- | app/build.gradle | 74 |
1 files changed, 44 insertions, 30 deletions
diff --git a/app/build.gradle b/app/build.gradle index 9207ff84..7d6d0a2c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,16 +1,9 @@ apply plugin: 'android' -import org.ajoberstar.grgit.* +//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 { @@ -47,6 +40,9 @@ android { dependencies { androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.2.1' + compile 'com.jakewharton:butterknife:6.0.0+' + provided 'com.squareup.dagger:dagger-compiler:1.2.2+' + compile 'com.github.pedrovgs:renderers:1.3+' compile 'com.intellij:annotations:12.0' } @@ -58,24 +54,16 @@ def processFileInplace(file, Closure processText) { task checkoutStrippedIcsOpenVPN ( type: Copy ) { //FIXME Checkout ics-openvpn-stripped from branch "ics-openvpn-upstream" - grgit = Grgit.open(project.file('../')) + //grgit = Grgit.open(project.file('../')) from '../../bitmask_android_tmp/ics-openvpn-stripped' 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') } @@ -88,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')) @@ -145,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/**' @@ -157,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 |