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 +}