From 39b06f3f5f371f0ec03e20292a81cb514cb6061e Mon Sep 17 00:00:00 2001 From: Fup Duck Date: Tue, 23 Jan 2018 11:10:40 +0100 Subject: new UI for EipFragment --- app/build.gradle | 1 + 1 file changed, 1 insertion(+) (limited to 'app/build.gradle') diff --git a/app/build.gradle b/app/build.gradle index b28d9f35..2e6604f2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -93,6 +93,7 @@ dependencies { compile 'com.android.support:appcompat-v7:26.1.0' compile 'com.android.support:design:26.1.0' compile 'com.android.support:support-fragment:26.1.0' + compile 'com.android.support.constraint:constraint-layout:1.0.2' } // Ensure the no-op dependency is always used in JVM tests. -- cgit v1.2.3 From a22a22d8fffb312b0d6dfdf545ff6fe6f05dbcee Mon Sep 17 00:00:00 2001 From: cyBerta Date: Mon, 29 Jan 2018 16:10:15 +0100 Subject: #8818 test NavigationDrawer with espresso test and update sdk therefore --- app/build.gradle | 52 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 13 deletions(-) (limited to 'app/build.gradle') diff --git a/app/build.gradle b/app/build.gradle index 2e6604f2..6e05a6d3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,13 +4,18 @@ import java.util.regex.Pattern apply plugin: 'com.android.application' android { - compileSdkVersion 26 - buildToolsVersion '26.0.0' + compileSdkVersion 27 + buildToolsVersion '27.0.3' defaultConfig { applicationId "se.leap.bitmaskclient" resValue "string", "app_name", "Bitmask" vectorDrawables.useSupportLibrary = true + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + dexOptions { + jumboMode true + multiDexEnabled true + } } signingConfigs { @@ -42,6 +47,9 @@ android { applicationIdSuffix ".beta" resValue "string", "app_name", "Bitmask Beta" } + debug { + testCoverageEnabled = true + } } lintOptions { @@ -57,23 +65,32 @@ android { debug { assets.srcDirs = ['src/debug/assets'] } + test { resources.srcDirs += ['src/test/resources'] + java.srcDirs += ['src/sharedTest/java'] + } + + androidTest { + java.srcDirs += ['src/sharedTest/java'] } } } dependencies { testCompile 'junit:junit:4.12' - testCompile 'org.mockito:mockito-core:2.8.0' - testCompile 'org.powermock:powermock-api-mockito2:1.7.3' + testCompile 'org.mockito:mockito-core:2.8.9' + testCompile('org.powermock:powermock-api-mockito2:1.7.3') + { exclude group: 'junit' exclude group: 'org.mockito' } testCompile 'org.powermock:powermock-module-junit4:1.7.3' testCompile 'org.powermock:powermock-core:1.7.3' testCompile 'org.powermock:powermock-module-junit4-rule:1.7.3' - //testCompile 'com.madgag.spongycastle:bctls-jdk15on:1.58.0.0' - //testCompile 'com.madgag.spongycastle:bcpkix-jdk15on:1.58.0.0' - //testCompile 'com.madgag.spongycastle:bcpg-jdk15on:1.58.0.0' + androidTestCompile 'org.mockito:mockito-core:2.8.9' + androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1' + androidTestCompile 'com.android.support.test.espresso:espresso-contrib:3.0.1' + androidTestCompile 'com.android.support.test.espresso:espresso-intents:3.0.1' + //TODO: remove that library androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.6.3' testCompile 'junit:junit:4.12' testCompile 'org.json:json:20170516' @@ -81,19 +98,22 @@ dependencies { releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' betaCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' compile 'com.jakewharton:butterknife:6.1.0' + //TODO: replace that library provided 'com.squareup.dagger:dagger-compiler:1.2.2' + //TODO: remove that library? compile 'com.github.pedrovgs:renderers:1.5' compile 'com.intellij:annotations:12.0' compile 'com.google.code.gson:gson:2.8.2' compile 'com.squareup.okhttp3:okhttp:3.9.0' + //TODO: remove that library compile 'mbanje.kurt:fabbutton:1.1.4' - compile "com.android.support:support-core-utils:26.1.0" + compile "com.android.support:support-core-utils:27.0.2" compile 'com.android.support:support-annotations:27.0.2' - compile 'com.android.support:support-v4:26.1.0' - compile 'com.android.support:appcompat-v7:26.1.0' - compile 'com.android.support:design:26.1.0' - compile 'com.android.support:support-fragment:26.1.0' - compile 'com.android.support.constraint:constraint-layout:1.0.2' + compile 'com.android.support:support-v4:27.0.2' + compile 'com.android.support:appcompat-v7:27.0.2' + compile 'com.android.support:design:27.0.2' + compile 'com.android.support:support-fragment:27.0.2' + compile 'com.android.support.constraint:constraint-layout:1.0.2' } // Ensure the no-op dependency is always used in JVM tests. @@ -105,6 +125,12 @@ configurations.all { config -> } } } + resolutionStrategy.force "com.android.support:support-annotations:27.0.2" + resolutionStrategy.force "com.android.support:support-v4:27.0.2" + resolutionStrategy.force "ccom.android.support:support-core-utils:27.0.2" + resolutionStrategy.force "com.android.support:appcompat-v7:27.0.2" + resolutionStrategy.force "com.android.support:design:27.0.2" + resolutionStrategy.force "com.android.support:support-fragment:27.0.2" } def processFileInplace(file, Closure processText) { -- cgit v1.2.3 From 68005203be024acbf00c2dbd73e789a60ffaa480 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 1 Feb 2018 14:48:39 +0100 Subject: #8832 update build.gradle disable old build-script --- app/build.gradle | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'app/build.gradle') diff --git a/app/build.gradle b/app/build.gradle index 2e6604f2..055cd709 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -22,13 +22,23 @@ android { } } + flavorDimensions "implementation" productFlavors { production { - + dimension "implementation" } insecure { + dimension "implementation" + } +/* + noovpn3 { + //dimension "implementation" + } + normal { + //dimension "implementation" } +*/ } buildTypes { @@ -50,7 +60,7 @@ android { sourceSets { main { - assets.srcDirs = ['assets', 'ovpnlibs/assets'] + assets.srcDirs = ['assets'/*, 'ovpnlibs/assets'*/] jniLibs.srcDirs = ['ovpnlibs/jniLibs'] jni.srcDirs = [] //disable automatic ndk-build } @@ -80,6 +90,8 @@ dependencies { debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4' releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' betaCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' + annotationProcessor 'com.jakewharton:butterknife:6.1.0' + annotationProcessor 'com.squareup.dagger:dagger-compiler:1.2.2' compile 'com.jakewharton:butterknife:6.1.0' provided 'com.squareup.dagger:dagger-compiler:1.2.2' compile 'com.github.pedrovgs:renderers:1.5' @@ -179,6 +191,20 @@ task copyIcsOpenVPNImages( type: Copy ) { include '**/ic_check*.png' include '**/ic_pause*.png' include '**/ic_play*.png' + include '**/ic_content_copy_white_*.png' + include '**/ic_add_circle_outline_white_*.png' + include '**/ic_warning_black_*.png' + include '**/ic_add_circle_outline_grey600_*.png' + include '**/ic_archive_grey600_*.png' + include '**/ic_receipt_white_*.png' + include '**/ic_sort_white_*.png' + include '**/ic_content_copy_white_*.png' + include '**/ic_archive_white_*.png' + include '**/ic_menu_archive*.png' + include '**/vpn_item_settings*.png' + include '**/ic_menu_log*.png' + include '**/ic_menu_copy_holo_light*.png' + includeEmptyDirs = false } into '.' } @@ -242,7 +268,7 @@ task mergeUntranslatable( type: Copy ) { task copyIcsOpenVPNFiles( type: Copy ) { println "copyIcsOpenVPNFiles" - copyIcsOpenVPNClasses.execute() + //copyIcsOpenVPNClasses.execute() copyIcsOpenVPNXml.execute() copyIcsOpenVPNImages.execute() //mergeUntranslatable.execute() @@ -250,14 +276,17 @@ task copyIcsOpenVPNFiles( type: Copy ) { } task updateIcsOpenVpn( type: Exec ) { + commandLine 'git', 'submodule', 'sync' commandLine 'git', 'submodule', 'update', '--init', '--recursive' copyIcsOpenVPNFiles.execute() } +/* task buildNative ( type: Exec ) { println "buildNative" - commandLine 'sh', 'misc/build-native.sh', 'USE_BREAKPAD=0', '-j 8' + //commandLine 'sh', 'misc/build-native.sh', 'USE_BREAKPAD=0', '-j 8' } +*/ task cleanNative( type: Delete ) { def shouldClean = getCurrentFlavorForBetaOrRelease() == "production" @@ -292,4 +321,4 @@ def getCurrentFlavorForBetaOrRelease() { } } -preBuild.dependsOn buildNative +//preBuild.dependsOn buildNative -- cgit v1.2.3 From 9e9364d458f3717e29dfc0284985a70fbe62eff6 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 1 Feb 2018 15:32:27 +0100 Subject: fix build.gradle script - undo outcommenting ovpnlibs/assets folder --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/build.gradle') diff --git a/app/build.gradle b/app/build.gradle index 055cd709..759871fb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -60,7 +60,7 @@ android { sourceSets { main { - assets.srcDirs = ['assets'/*, 'ovpnlibs/assets'*/] + assets.srcDirs = ['assets', 'ovpnlibs/assets'] jniLibs.srcDirs = ['ovpnlibs/jniLibs'] jni.srcDirs = [] //disable automatic ndk-build } -- cgit v1.2.3 From 55abdcc6ec0773864ac16a74880c40c929e12c1d Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 2 Feb 2018 01:18:03 +0100 Subject: #8832 add gradle task for license issue --- app/build.gradle | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/build.gradle') diff --git a/app/build.gradle b/app/build.gradle index 9eca4753..edfa9439 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -326,6 +326,11 @@ task cleanNative( type: Delete ) { } } +task updateSdkLicences ( type: Exec ) { + println "say yes to licenses" + commandLine 'sh', 'yes', '|', 'sdkmanager', '--licenses' +} + def getCurrentFlavorForBetaOrRelease() { Gradle gradle = getGradle() String tskReqStr = gradle.getStartParameter().getTaskRequests().toString() -- cgit v1.2.3 From 33cae95b08c46ebbdf7e1b3e83b51c53c7fcf099 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Mon, 5 Feb 2018 01:52:47 +0100 Subject: #8832 update gradle file: replace deprecated compile with new implementation method --- app/build.gradle | 68 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 33 deletions(-) (limited to 'app/build.gradle') diff --git a/app/build.gradle b/app/build.gradle index edfa9439..8732c4df 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -88,44 +88,44 @@ android { } dependencies { - testCompile 'junit:junit:4.12' - testCompile 'org.mockito:mockito-core:2.8.9' - testCompile('org.powermock:powermock-api-mockito2:1.7.3') + testImplementation 'junit:junit:4.12' + testImplementation 'org.mockito:mockito-core:2.8.9' + testImplementation('org.powermock:powermock-api-mockito2:1.7.3') { exclude group: 'junit' exclude group: 'org.mockito' } - testCompile 'org.powermock:powermock-module-junit4:1.7.3' - testCompile 'org.powermock:powermock-core:1.7.3' - testCompile 'org.powermock:powermock-module-junit4-rule:1.7.3' - - androidTestCompile 'org.mockito:mockito-core:2.8.9' - androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1' - androidTestCompile 'com.android.support.test.espresso:espresso-contrib:3.0.1' - androidTestCompile 'com.android.support.test.espresso:espresso-intents:3.0.1' + testImplementation 'org.powermock:powermock-module-junit4:1.7.3' + testImplementation 'org.powermock:powermock-core:1.7.3' + testImplementation 'org.powermock:powermock-module-junit4-rule:1.7.3' + + androidTestImplementation 'org.mockito:mockito-core:2.8.9' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' + androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.1' + androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.1' //TODO: remove that library - androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.6.3' - testCompile 'junit:junit:4.12' - testCompile 'org.json:json:20170516' - debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4' - releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' - betaCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' + androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.6.3' + testImplementation 'junit:junit:4.12' + testImplementation 'org.json:json:20170516' + debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4' + releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' + betaImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' annotationProcessor 'com.jakewharton:butterknife:6.1.0' annotationProcessor 'com.squareup.dagger:dagger-compiler:1.2.2' - compile 'com.jakewharton:butterknife:6.1.0' + implementation 'com.jakewharton:butterknife:6.1.0' //TODO: replace that library - provided 'com.squareup.dagger:dagger-compiler:1.2.2' + compileOnly 'com.squareup.dagger:dagger-compiler:1.2.2' //TODO: remove that library? - compile 'com.github.pedrovgs:renderers:1.5' - compile 'com.intellij:annotations:12.0' - compile 'com.google.code.gson:gson:2.8.2' - compile 'com.squareup.okhttp3:okhttp:3.9.0' + implementation 'com.github.pedrovgs:renderers:1.5' + implementation 'com.intellij:annotations:12.0' + implementation 'com.google.code.gson:gson:2.8.2' + implementation 'com.squareup.okhttp3:okhttp:3.9.0' //TODO: remove that library - compile 'mbanje.kurt:fabbutton:1.1.4' - compile "com.android.support:support-core-utils:27.0.2" - compile 'com.android.support:support-annotations:27.0.2' - compile 'com.android.support:support-v4:27.0.2' - compile 'com.android.support:appcompat-v7:27.0.2' - compile 'com.android.support:design:27.0.2' - compile 'com.android.support:support-fragment:27.0.2' - compile 'com.android.support.constraint:constraint-layout:1.0.2' + implementation 'mbanje.kurt:fabbutton:1.1.4' + implementation "com.android.support:support-core-utils:27.0.2" + implementation 'com.android.support:support-annotations:27.0.2' + implementation 'com.android.support:support-v4:27.0.2' + implementation 'com.android.support:appcompat-v7:27.0.2' + implementation 'com.android.support:design:27.0.2' + implementation 'com.android.support:support-fragment:27.0.2' + implementation 'com.android.support.constraint:constraint-layout:1.0.2' } // Ensure the no-op dependency is always used in JVM tests. @@ -292,9 +292,11 @@ task mergeUntranslatable( type: Copy ) { delete ics_openvpn_untranslatable } -task copyIcsOpenVPNFiles( type: Copy ) { +task copyIcsOpenVPNFiles( type: Exec ) { println "copyIcsOpenVPNFiles" - //copyIcsOpenVPNClasses.execute() + def currentPath = System.getProperty("user.dir") + commandLine 'bash', currentPath+'/managePatches.sh' + copyIcsOpenVPNClasses.execute() copyIcsOpenVPNXml.execute() copyIcsOpenVPNImages.execute() //mergeUntranslatable.execute() -- cgit v1.2.3 From 49c3d78764d2fdbc0e58bce62a2ea8439e89d7e7 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Mon, 5 Feb 2018 14:07:39 +0100 Subject: 8832 custom build script that builds first :ics-openvpn:main and afterwards :app --- app/build.gradle | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'app/build.gradle') diff --git a/app/build.gradle b/app/build.gradle index 8732c4df..c2a42d3d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -35,15 +35,6 @@ android { insecure { dimension "implementation" } -/* - noovpn3 { - //dimension "implementation" - } - - normal { - //dimension "implementation" - } -*/ } buildTypes { @@ -56,6 +47,7 @@ android { initWith release applicationIdSuffix ".beta" resValue "string", "app_name", "Bitmask Beta" + matchingFallbacks = ['release'] } debug { testCoverageEnabled = true @@ -68,8 +60,8 @@ android { sourceSets { main { - assets.srcDirs = ['assets', 'ovpnlibs/assets'] - jniLibs.srcDirs = ['ovpnlibs/jniLibs'] + assets.srcDirs = ['assets', 'ovpnlibs/assets', '../ics-openvpn/main/build/ovpnassets'] + jniLibs.srcDirs = ['../ics-openvpn/main/build/intermediates/cmake/noovpn3/release/obj'] jni.srcDirs = [] //disable automatic ndk-build } debug { @@ -292,11 +284,9 @@ task mergeUntranslatable( type: Copy ) { delete ics_openvpn_untranslatable } -task copyIcsOpenVPNFiles( type: Exec ) { +task copyIcsOpenVPNFiles( type: Copy ) { println "copyIcsOpenVPNFiles" - def currentPath = System.getProperty("user.dir") - commandLine 'bash', currentPath+'/managePatches.sh' - copyIcsOpenVPNClasses.execute() + //copyIcsOpenVPNClasses.execute() copyIcsOpenVPNXml.execute() copyIcsOpenVPNImages.execute() //mergeUntranslatable.execute() @@ -309,12 +299,6 @@ task updateIcsOpenVpn( type: Exec ) { copyIcsOpenVPNFiles.execute() } -/* -task buildNative ( type: Exec ) { - println "buildNative" - //commandLine 'sh', 'misc/build-native.sh', 'USE_BREAKPAD=0', '-j 8' -} -*/ task cleanNative( type: Delete ) { def shouldClean = getCurrentFlavorForBetaOrRelease() == "production" @@ -353,5 +337,3 @@ def getCurrentFlavorForBetaOrRelease() { return ""; } } - -//preBuild.dependsOn buildNative -- cgit v1.2.3 From 7121aeb4fa76cfd8a3de73a0e78ab42ad789f0c7 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Tue, 6 Feb 2018 13:28:30 +0100 Subject: 8832 code review fixes --- app/build.gradle | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'app/build.gradle') diff --git a/app/build.gradle b/app/build.gradle index c2a42d3d..9b8b57d0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -47,7 +47,6 @@ android { initWith release applicationIdSuffix ".beta" resValue "string", "app_name", "Bitmask Beta" - matchingFallbacks = ['release'] } debug { testCoverageEnabled = true @@ -131,7 +130,7 @@ configurations.all { config -> } resolutionStrategy.force "com.android.support:support-annotations:27.0.2" resolutionStrategy.force "com.android.support:support-v4:27.0.2" - resolutionStrategy.force "ccom.android.support:support-core-utils:27.0.2" + resolutionStrategy.force "com.android.support:support-core-utils:27.0.2" resolutionStrategy.force "com.android.support:appcompat-v7:27.0.2" resolutionStrategy.force "com.android.support:design:27.0.2" resolutionStrategy.force "com.android.support:support-fragment:27.0.2" @@ -286,7 +285,7 @@ task mergeUntranslatable( type: Copy ) { task copyIcsOpenVPNFiles( type: Copy ) { println "copyIcsOpenVPNFiles" - //copyIcsOpenVPNClasses.execute() + copyIcsOpenVPNClasses.execute() copyIcsOpenVPNXml.execute() copyIcsOpenVPNImages.execute() //mergeUntranslatable.execute() -- cgit v1.2.3 From 73d2b51a481df253c5d887897ffbc55581b15bef Mon Sep 17 00:00:00 2001 From: cyBerta Date: Tue, 6 Feb 2018 14:07:47 +0100 Subject: #8832 add BuildConfig field opvnvpn3 (false) in order to use openvpn2.x --- app/build.gradle | 1 + 1 file changed, 1 insertion(+) (limited to 'app/build.gradle') diff --git a/app/build.gradle b/app/build.gradle index 9b8b57d0..c909b70f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,6 +11,7 @@ android { applicationId "se.leap.bitmaskclient" resValue "string", "app_name", "Bitmask" vectorDrawables.useSupportLibrary = true + buildConfigField 'boolean', 'openvpn3', 'false' testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" dexOptions { jumboMode true -- cgit v1.2.3