From 52259cf5b94bd625494302e788cf64d773d3545c Mon Sep 17 00:00:00 2001 From: Jonatan Rhodin Date: Tue, 10 Dec 2024 23:37:13 +0100 Subject: [PATCH] Fix some errors --- android/app/build.gradle.kts | 2 +- android/build-apk.sh | 2 -- wireguard-go-rs/build.rs | 10 ++++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index c8756fb562e2..5058bf5fc7fe 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -37,7 +37,7 @@ android { namespace = "net.mullvad.mullvadvpn" compileSdk = Versions.compileSdkVersion buildToolsVersion = Versions.buildToolsVersion - ndkVersion = "27.1.12297006" + ndkVersion = "27.2.12479018" defaultConfig { val localProperties = gradleLocalProperties(rootProject.projectDir, providers) diff --git a/android/build-apk.sh b/android/build-apk.sh index 383dc9f2db23..277504ac4489 100755 --- a/android/build-apk.sh +++ b/android/build-apk.sh @@ -18,8 +18,6 @@ BUILD_BUNDLE="no" BUNDLE_TASKS=(createPlayProdReleaseDistBundle) RUN_PLAY_PUBLISH_TASKS="no" PLAY_PUBLISH_TASKS=() -CARGO_ARGS=( "--release" ) -CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-"target"} SKIP_STRIPPING=${SKIP_STRIPPING:-"no"} while [ -n "${1:-""}" ]; do diff --git a/wireguard-go-rs/build.rs b/wireguard-go-rs/build.rs index be1dfd898d86..a1b138c0d943 100644 --- a/wireguard-go-rs/build.rs +++ b/wireguard-go-rs/build.rs @@ -176,10 +176,7 @@ fn build_android_dynamic_lib(daita: bool) -> anyhow::Result<()> { "cargo::rerun-if-changed={}", android_output_path(target)?.join("libwg.so").display() ); - println!( - "cargo::rerun-if-changed={}", - libwg_path()?.display() - ); + println!("cargo::rerun-if-changed={}", libwg_path()?.display()); // Before calling `canonicalize`, the directory we're referring to actually has to exist. std::fs::create_dir_all("../build")?; @@ -279,13 +276,14 @@ fn android_arch_name(target: AndroidTarget) -> String { // Returns the path where the Android project expects Rust binaries to be fn android_output_path(target: AndroidTarget) -> anyhow::Result { - let relative_output_path = Path::new("../android/app/build/rustJniLibs/android").join(android_abi(target)); + let relative_output_path = + Path::new("../android/app/build/rustJniLibs/android").join(android_abi(target)); std::fs::create_dir_all(relative_output_path.clone())?; let output_path = relative_output_path.canonicalize()?; Ok(output_path) } -// Return the path of the libwg folder so that we can trigger rebuilds when any code is +// Return the path of the libwg folder so that we can trigger rebuilds when any code is fn libwg_path() -> anyhow::Result { let relative_output_path = Path::new("libwg"); let output_path = relative_output_path.canonicalize()?;