From e4aea80f0b0e97253514ed00c7548b7778ff5ae1 Mon Sep 17 00:00:00 2001 From: Armand <4831c0@proton.me> Date: Sat, 27 Sep 2025 20:56:10 +0200 Subject: [PATCH] android/gradle: Use /usr/bin/ as ANDROID_SDK_ROOT fallback --- firka/android/app/build.gradle.kts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/firka/android/app/build.gradle.kts b/firka/android/app/build.gradle.kts index b60440de..ea8f62e7 100644 --- a/firka/android/app/build.gradle.kts +++ b/firka/android/app/build.gradle.kts @@ -685,6 +685,11 @@ fun getDebugKeystorePath(): String { fun getDefaultAndroidSdkPath(): String? { val os = System.getProperty("os.name").lowercase() val userHome = System.getProperty("user.home") + val zipAlign = File("/usr/bin/zipalign") + + if (zipAlign.exists()) { + return "/usr/bin" + } return when { os.contains("win") -> @@ -740,6 +745,11 @@ fun findToolInSdkPath(toolName: String): String? { return toolExec.absolutePath } } + } else { + val toolExec = File(androidHome, toolName) + if (toolExec.exists()) { + return toolExec.absolutePath + } } } @@ -883,4 +893,4 @@ fun signBundle(input: File, output: File) { } println("AAB signed and aligned successfully") -} \ No newline at end of file +}