diff options
Diffstat (limited to 'app/build.gradle')
-rw-r--r-- | app/build.gradle | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/app/build.gradle b/app/build.gradle index f2ddd9cd..1057da44 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'android' +import org.ajoberstar.grgit.* android { compileSdkVersion 19 @@ -23,14 +24,15 @@ android { buildTypes { release { //runProguard true - signingConfig signingConfigs.release.isSigningReady() ? signingConfigs.release : signingConfigs.debug + if(signingConfigs.contains(release)) + signingConfig signingConfigs.release.isSigningReady() ? signingConfigs.release : signingConfigs.debug } } lintOptions { abortOnError false } - + sourceSets { main { assets.srcDirs = ['assets', 'ovpnlibs/assets'] @@ -41,13 +43,9 @@ android { assets.srcDirs = ['src/debug/assets'] } } - - //check.dependsOn connectedCheck } dependencies { - // androidTestCompile 'com.android.support:support-v4:20+' - // androidTestCompile 'com.android.support:appcompat-v7:20.+' androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.2.1' compile 'com.intellij:annotations:12.0' } @@ -60,7 +58,9 @@ def processFileInplace(file, Closure processText) { task checkoutStrippedIcsOpenVPN ( type: Copy ) { //FIXME Checkout ics-openvpn-stripped from branch "ics-openvpn-upstream" - from '/tmp/bitmask_android_tmp/ics-openvpn-stripped' + grgit = Grgit.open(project.file('../')) + + from '../../bitmask_android_tmp/ics-openvpn-stripped' into '../ics-openvpn-stripped' } @@ -96,10 +96,10 @@ task copyIcsOpenVPNClasses( type: Copy, dependsOn: 'checkoutStrippedIcsOpenVPN' // thanks to http://pleac.sourceforge.net/pleac_groovy/fileaccess.html task removeDuplicatedStrings( dependsOn: 'copyIcsOpenVPNClasses' ) << { - new File('.').eachFileRecurse { + new File('app').eachFileRecurse { if(it.name.equals('strings.xml')) { - def ics_openvpn_file = file(it.path.replace('strings.xml', 'strings-icsopenvpn.xml')) - if(ics_openvpn_file.exists()) { + def ics_openvpn_file = file(it.absolutePath.replace('strings.xml', 'strings-icsopenvpn.xml')) + if(ics_openvpn_file.exists()) { def ics_openvpn_strings_names = (new XmlParser()).parse(ics_openvpn_file) def current_file = it @@ -155,4 +155,8 @@ task updateIcsOpenVpn( type: Copy, dependsOn: 'mergeUntranslatable') { include 'snappy/**' } into '.' } -//build.dependsOn ':app:mergeUntranslatable'
\ No newline at end of file + +//assembleRelease.dependsOn connectedCheck +afterEvaluate { + //installRelease.dependsOn connectedCheck +} |