summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2018-02-05 14:07:39 +0100
committercyBerta <cyberta@riseup.net>2018-02-05 20:42:02 +0100
commit49c3d78764d2fdbc0e58bce62a2ea8439e89d7e7 (patch)
tree1ef880d601b67a77e41d141c04c310c84f5d22d7
parent33cae95b08c46ebbdf7e1b3e83b51c53c7fcf099 (diff)
8832 custom build script that builds first :ics-openvpn:main and afterwards :app
-rw-r--r--.gitlab-ci.yml12
-rw-r--r--app/build.gradle28
l---------app/src/main/cpp1
-rwxr-xr-xbuild.sh5
-rwxr-xr-xcleanProject.sh10
m---------ics-openvpn0
-rw-r--r--settings.gradle4
7 files changed, 29 insertions, 31 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b3b7de0a..ff5f559c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -97,9 +97,8 @@ build:
image: "0xacab.org:4567/leap/bitmask_android/android-ndk:latest"
stage: build
script:
- - git submodule sync --recursive
- - git submodule update --init --recursive
- - ./gradlew clean assembleDebug
+ - ./cleanProject.sh
+ - ./build.sh
artifacts:
paths:
- app/build/outputs/
@@ -108,9 +107,10 @@ build_release:
image: "0xacab.org:4567/leap/bitmask_android/android-ndk:latest"
stage: build
script:
- - git submodule sync --recursive
- - git submodule update --init --recursive
- - ./gradlew clean
+ - ./cleanProject.sh
+ - cd ./ics-openvpn
+ - ./gradlew clean main:externalNativeBuildCleanNoovpn3Release main:externalNativeBuildNoovpn3Release
+ - cd ..
- ./gradlew assembleProductionRelease
- ./gradlew assembleProductionBeta
artifacts:
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
diff --git a/app/src/main/cpp b/app/src/main/cpp
new file mode 120000
index 00000000..e445d43e
--- /dev/null
+++ b/app/src/main/cpp
@@ -0,0 +1 @@
+../../../ics-openvpn/main/src/main/cpp/ \ No newline at end of file
diff --git a/build.sh b/build.sh
new file mode 100755
index 00000000..070ba686
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+cd ./ics-openvpn
+./gradlew clean main:externalNativeBuildCleanNoovpn3Release main:externalNativeBuildNoovpn3Release
+cd ..
+./gradlew clean assembleDebug --stacktrace
diff --git a/cleanProject.sh b/cleanProject.sh
new file mode 100755
index 00000000..e4707215
--- /dev/null
+++ b/cleanProject.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+git checkout -- \*
+git checkout -- \.\*
+
+rm -r ./ics-openvpn
+rm -r ./build
+rm -r ./app/build
+git submodule sync --recursive
+git submodule update --init --recursive
diff --git a/ics-openvpn b/ics-openvpn
-Subproject 369ac22a4405bf2139c6e93439c2050411d92b1
+Subproject 97e2e6674ad1aff81b7b7d94e96594a532c4036
diff --git a/settings.gradle b/settings.gradle
index cae9d1b7..25c342e6 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,3 +1,3 @@
include ':app'
-include ':ics-openvpn'
-include ':ics-openvpn:main' \ No newline at end of file
+//include ':ics-openvpn'
+//include ':ics-openvpn:main' \ No newline at end of file