diff options
Diffstat (limited to 'app/build.gradle')
-rw-r--r-- | app/build.gradle | 68 |
1 files changed, 36 insertions, 32 deletions
diff --git a/app/build.gradle b/app/build.gradle index 9acd5ab1..b6bb39ff 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,9 +1,9 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 21 - buildToolsVersion "22.0.1" - + compileSdkVersion 23 + buildToolsVersion '25.0.2' +; signingConfigs { release { storeFile project.hasProperty('storeFileProperty') ? file(storeFileProperty) : null @@ -13,26 +13,26 @@ android { } } - productFlavors { - production { + productFlavors { + production { - } - insecure { + } + insecure { - } } + } buildTypes { release { //runProguard true if(signingConfigs.contains(release)) - signingConfig signingConfigs.release.isSigningReady() ? signingConfigs.release : signingConfigs.debug + signingConfig signingConfigs.release.isSigningReady() ? signingConfigs.release : signingConfigs.debug } } - lintOptions { - abortOnError false - } + lintOptions { + abortOnError false + } sourceSets { main { @@ -47,14 +47,16 @@ android { } dependencies { - androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.4.1' + androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.5.4' + testCompile 'junit:junit:4.12' compile 'com.jakewharton:butterknife:6.1.0' provided 'com.squareup.dagger:dagger-compiler:1.2.2' compile 'com.github.pedrovgs:renderers:1.5' compile 'com.intellij:annotations:12.0' - compile 'com.google.code.gson:gson:2.3.1' + compile 'com.google.code.gson:gson:2.4' compile 'org.thoughtcrime.ssl.pinning:AndroidPinning:1.0.0' compile 'mbanje.kurt:fabbutton:1.1.4' + compile 'com.android.support:support-annotations:23.2.1' } def processFileInplace(file, Closure processText) { @@ -81,16 +83,17 @@ task copyIcsOpenVPNClasses( type: Copy ) { include '**/dimens.xml' include '**/logmenu.xml' include '**/core/**.java' + include '**/activities/BaseActivity.java' includeEmptyDirs = false - + filter { line -> line.replaceAll('de.blinkt.openvpn.R', 'se.leap.bitmaskclient.R') } filter { line -> line.replaceAll('de.blinkt.openvpn.BuildConfig', 'se.leap.bitmaskclient.BuildConfig') } - filter { + filter { line -> line.replace('package de.blinkt.openvpn;', 'package de.blinkt.openvpn;\n\nimport se.leap.bitmaskclient.R;') } } into '.' @@ -105,11 +108,11 @@ task copyIcsOpenVPNXml( type: Copy ) { include '**/styles.xml' include '**/dimens.xml' include '**/refs.xml' - include '**/colours.xml' + include '**/colours.xml' include '**/logmenu.xml' include '**/white_rect.xml' includeEmptyDirs = false - + rename 'strings.xml', 'strings-icsopenvpn.xml' filter { line -> line.replaceAll('.*name="app".*', '') @@ -126,7 +129,8 @@ task copyIcsOpenVPNImages( type: Copy ) { include '**/ic_close*.png' include '**/ic_edit*.png' include '**/ic_check*.png' - + include '**/ic_pause*.png' + include '**/ic_play*.png' includeEmptyDirs = false } into '.' } @@ -138,14 +142,14 @@ task removeDuplicatedStrings() { if(it.name.equals('strings.xml')) { 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 - - ics_openvpn_strings_names.string.each { - processFileInplace(current_file) { text -> - text.replaceAll('.*name=\"' + it.attribute('name') + '\".*(\n)*.*string>.*\n+', '') - } - } + def ics_openvpn_strings_names = (new XmlParser()).parse(ics_openvpn_file) + def current_file = it + + ics_openvpn_strings_names.string.each { + processFileInplace(current_file) { text -> + text.replaceAll('.*name=\"' + it.attribute('name') + '\".*(\n)*.*string>.*\n+', '') + } + } } } } @@ -164,20 +168,20 @@ task mergeUntranslatable( type: Copy ) { ics_openvpn_untranslatable.eachLine { text -> if(text.contains('string name=')) { if(!bitmask_untranslatable.text.contains(text)) - bitmask_untranslatable << text - if(text.contains('</string>')) - string_continuation = true + bitmask_untranslatable << text + if(text.contains('</string>')) + string_continuation = true } else if(string_continuation) { bitmask_untranslatable << text } - + if(text.contains('</string>')) { string_continuation = false bitmask_untranslatable << System.getProperty("line.separator") } } - + bitmask_untranslatable.write(bitmask_untranslatable.text.replaceAll("</resources>", "")) bitmask_untranslatable << "</resources>" |