Skip to content

Commit

Permalink
fix: replace System.getProperty with System.getenv
Browse files Browse the repository at this point in the history
Tested-by: Pranav Purwar <[email protected]>
Signed-off-by: PranavPurwar <[email protected]>
  • Loading branch information
PranavPurwar committed Sep 30, 2023
1 parent e006267 commit 4fa3414
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,11 @@ dependencies {

// Fetches Android SDK root
fun getSdkDir(): File {
var sdk = System.getProperty("ANDROID_HOME")
var sdk = System.getenv("ANDROID_HOME")

if (sdk.isNullOrBlank()) {
sdk = System.getenv("ANDROID_SDK")
}

if (sdk.isNullOrBlank()) {
val f = File(System.getProperty("user.dir") + "/local.properties")
Expand Down

0 comments on commit 4fa3414

Please sign in to comment.