mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Check if android.jar exists
and throw exception if not
This commit is contained in:
parent
92a6d01507
commit
8274a9f25b
1 changed files with 6 additions and 1 deletions
|
@ -18,7 +18,12 @@ dependencies {
|
||||||
def getAndroidRuntimeJar() {
|
def getAndroidRuntimeJar() {
|
||||||
def androidHome = new File("$System.env.ANDROID_HOME")
|
def androidHome = new File("$System.env.ANDROID_HOME")
|
||||||
if (!androidHome.isDirectory()) throw new Exception("ANDROID_HOME not found or set")
|
if (!androidHome.isDirectory()) throw new Exception("ANDROID_HOME not found or set")
|
||||||
new File("$androidHome/platforms/android-$smackMinAndroidSdk/android.jar")
|
def androidJar = new File("$androidHome/platforms/android-$smackMinAndroidSdk/android.jar")
|
||||||
|
if (androidJar.isFile()) {
|
||||||
|
return androidJar
|
||||||
|
} else {
|
||||||
|
throw new Exception("Can't find android.jar for $smackMinAndroidSdk API. Please install corresponding SDK platform package")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def getAndroidJavadocOffline() {
|
def getAndroidJavadocOffline() {
|
||||||
|
|
Loading…
Reference in a new issue