forked from firka/firka
android/gradle: Use /usr/bin/ as ANDROID_SDK_ROOT fallback
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user