summaryrefslogtreecommitdiff
path: root/app/build.gradle
diff options
context:
space:
mode:
authoraguestuser <aguestuser@risup.net>2017-05-04 17:26:28 +0200
committerkwadronaut <kwadronaut@leap.se>2017-05-04 17:34:06 +0200
commit59985587c758f93844df7600f18c0837c672f259 (patch)
tree044b866f2bd9a83246a6128c0e6f8afc4ce5a9d0 /app/build.gradle
parent0688c9e8ceab724874bd795f35dc64f498c416b0 (diff)
parent4333fd93e3a1c64f6c0fb42be9ae29879ea2c7f0 (diff)
Update README, Dockerfile to build, smoothing on-boarding
Closes https://0xacab.org/leap/bitmask_android/merge_requests/1 README: add detailed instructions on installing and compiling provide workarounds for gotchas setting up emulator on 64-bit debian provide updated dockerfile & offer instructions for building in docker Docker: move dockerfiles to registry contained w/in bitmask_android repo provide separate dockerfiles for sdk (base), ndk, and emulator images resolve issues causing containerized build to fail, including: upstream ics-openvpn conflict with clang (:. transitively with ndk > r12b) (subtle!) missing dependency of ndk r12b on file (message: "missing file" meant a missing program called "file" not an actual missing file) missing locales causing errors in copyIcsOpenVPNFiles build step (resolved by generating all locales in dockerfile) silent failure in sdknmanager's isntallation of platforms;android-23 during image build causing install failure in remote (but not local!) containers Signed-off-by: kwadronaut <kwadronaut@leap.se>
Diffstat (limited to 'app/build.gradle')
-rw-r--r--app/build.gradle65
1 files changed, 33 insertions, 32 deletions
diff --git a/app/build.gradle b/app/build.gradle
index e9fe2f60..b6bb39ff 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -2,8 +2,8 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 23
- buildToolsVersion "23.0.3"
-
+ 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 {
@@ -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>"