Skip to content

Commit

Permalink
fix(core): fallback to WRY_ANDROID_PACKAGE with backticks replaced (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir authored Oct 14, 2024
1 parent e75f0d2 commit f3f521f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/android-unescaped.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri": "patch:bug"
---

Fix `TAURI_ANDROID_PACKAGE_UNESCAPED not set` panic during compilation for Android when using an older tauri cli.
3 changes: 2 additions & 1 deletion crates/tauri/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ fn main() {
}

if let Some(project_dir) = env::var_os("TAURI_ANDROID_PROJECT_PATH").map(PathBuf::from) {
let package_unescaped = env_var("TAURI_ANDROID_PACKAGE_UNESCAPED");
let package_unescaped = env::var("TAURI_ANDROID_PACKAGE_UNESCAPED")
.unwrap_or_else(|_| env_var("WRY_ANDROID_PACKAGE").replace('`', ""));
let tauri_proguard =
include_str!("./mobile/proguard-tauri.pro").replace("$PACKAGE", &package_unescaped);
std::fs::write(
Expand Down

0 comments on commit f3f521f

Please sign in to comment.