# The Android toolchain, for the detour scripts (build.sh, dev.sh). Sourced, # never run. A bash session started before the user variables were set does # not see them, so everything is spelled out here. SDK="$(cygpath -u "$LOCALAPPDATA")/Android/Sdk" NDKV=28.2.13676358 BIN="$SDK/ndk/$NDKV/toolchains/llvm/prebuilt/windows-x86_64/bin" export ANDROID_HOME="$(cygpath -w "$SDK")" export ANDROID_SDK_ROOT="$ANDROID_HOME" export NDK_HOME="$(cygpath -w "$SDK/ndk/$NDKV")" export ANDROID_NDK_HOME="$NDK_HOME" export ANDROID_NDK_ROOT="$NDK_HOME" export JAVA_HOME="C:\Program Files\Java\jdk-17" export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="$(cygpath -w "$BIN/aarch64-linux-android26-clang.cmd")" export CC_aarch64_linux_android="$(cygpath -w "$BIN/aarch64-linux-android26-clang.cmd")" export CXX_aarch64_linux_android="$(cygpath -w "$BIN/aarch64-linux-android26-clang++.cmd")" export AR_aarch64_linux_android="$(cygpath -w "$BIN/llvm-ar.exe")" export PATH="$SDK/platform-tools:$PATH" # tauri-build regenerates gen/android/tauri.settings.gradle and # app/tauri.build.gradle.kts — the lines that include every plugin's Android # module — ONLY when the CLI's variable names the project. Without it a new # plugin (the media session) compiled fine and never reached the APK. export TAURI_ANDROID_PROJECT_PATH="$(cygpath -w "$PWD/src-tauri/gen/android")" ADB="$SDK/platform-tools/adb.exe"