summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorJoakim Hulthe <joakim.hulthe@mullvad.net>2024-11-29 10:48:15 +0100
committerSebastian Holmin <sebastian.holmin@mullvad.net>2025-05-26 15:53:07 +0200
commit8f3900bb993c3a3859564fd97f052fd1cecbb37e (patch)
treea5f1644b4999086a644a8e27c3c5627a5738c2e8 /android
parent9dfafb3e5031c991db0b6117c8cd6a71d86deb40 (diff)
downloadmullvadvpn-8f3900bb993c3a3859564fd97f052fd1cecbb37e.tar.xz
mullvadvpn-8f3900bb993c3a3859564fd97f052fd1cecbb37e.zip
Add Boringtun
Co-authored-by: Joakim Hulthe <joakim.hulthe@mullvad.net> Co-authored-by: Sebastian Holmin <sebastian.holmin@mullvad.net> Co-authored-by: David Göransson <david.goransson@mullvad.net> Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net> Co-authored-by: David Lönnhager <david.l@mullvad.net>
Diffstat (limited to 'android')
-rw-r--r--android/app/build.gradle.kts11
-rw-r--r--android/gradle.properties3
2 files changed, 12 insertions, 2 deletions
diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts
index 0dfc4d9236..a628476cb6 100644
--- a/android/app/build.gradle.kts
+++ b/android/app/build.gradle.kts
@@ -247,6 +247,7 @@ junitPlatform {
cargo {
val isReleaseBuild = isReleaseBuild()
+ val enableBoringTun = getBooleanProperty("mullvad.app.build.boringtun.enable")
val enableApiOverride = !isReleaseBuild || isDevBuild() || isAlphaBuild()
module = repoRootPath
libname = "mullvad-jni"
@@ -262,9 +263,15 @@ cargo {
prebuiltToolchains = true
targetDirectory = "$repoRootPath/target"
features {
- if (enableApiOverride) {
- defaultAnd(arrayOf("api-override"))
+ val enabledFeatures = buildList {
+ if (enableApiOverride) {
+ add("api-override")
+ }
+ if (enableBoringTun) {
+ add("boringtun")
+ }
}
+ defaultAnd(enabledFeatures.toTypedArray())
}
targetIncludes = arrayOf("libmullvad_jni.so")
extraCargoBuildArguments = buildList {
diff --git a/android/gradle.properties b/android/gradle.properties
index 07b1de2faf..22dc06c43c 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -33,6 +33,9 @@ mullvad.app.build.cargo.cleanBuild=true
# to be substantially larger.
mullvad.app.build.keepDebugSymbols=false
+# Enable/Disable boringtun
+mullvad.app.build.boringtun.enable=false
+
## E2E tests ##
# To run e2e tests you need to provide credentails for the enviroment you