Throw exception on missing envvar for Android-related builds

This commit is contained in:
moving-bits 2023-01-04 19:40:24 +01:00
parent 6b98cb7d89
commit b7d1fe5695
4 changed files with 16 additions and 0 deletions

View File

@ -85,3 +85,7 @@ task run(dependsOn: 'installDebug') {
proc.waitFor()
}
}
if (System.getenv('ANDROID_HOME') == null) {
throw new GradleException("Environment variable ANDROID_HOME needs to be set to SDK folder")
}

View File

@ -34,3 +34,7 @@ if (project.hasProperty("SONATYPE_USERNAME")) {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
}
if (System.getenv('ANDROID_HOME') == null) {
throw new GradleException("Environment variable ANDROID_HOME needs to be set to SDK folder")
}

View File

@ -24,3 +24,7 @@ if (project.hasProperty("SONATYPE_USERNAME")) {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
}
if (System.getenv('ANDROID_HOME') == null) {
throw new GradleException("Environment variable ANDROID_HOME needs to be set to SDK folder")
}

View File

@ -34,3 +34,7 @@ if (project.hasProperty("SONATYPE_USERNAME")) {
project.apply from: "${rootProject.projectDir}/deploy.gradle"
}
}
if (System.getenv('ANDROID_HOME') == null) {
throw new GradleException("Environment variable ANDROID_HOME needs to be set to SDK folder")
}