summaryrefslogtreecommitdiff
path: root/app/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'app/build.gradle')
-rw-r--r--app/build.gradle63
1 files changed, 32 insertions, 31 deletions
diff --git a/app/build.gradle b/app/build.gradle
index e9fe2f60..cd7e6e21 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 23
- buildToolsVersion "23.0.3"
+ buildToolsVersion '25.0.0'
signingConfigs {
release {
@@ -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 {
@@ -48,6 +48,7 @@ android {
dependencies {
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'
@@ -55,7 +56,7 @@ dependencies {
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'
+ compile 'com.android.support:support-annotations:23.2.1'
}
def processFileInplace(file, Closure processText) {
@@ -82,17 +83,17 @@ task copyIcsOpenVPNClasses( type: Copy ) {
include '**/dimens.xml'
include '**/logmenu.xml'
include '**/core/**.java'
- include '**/activities/BaseActivity.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 '.'
@@ -107,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".*', '')
@@ -128,8 +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'
+ include '**/ic_pause*.png'
+ include '**/ic_play*.png'
includeEmptyDirs = false
} into '.'
}
@@ -141,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+', '')
+ }
+ }
}
}
}
@@ -167,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>"