1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

Check if android.jar exists

and throw exception if not
This commit is contained in:
Vyacheslav Blinov 2014-08-07 18:02:17 +04:00 committed by Florian Schmaus
parent 92a6d01507
commit 8274a9f25b

View file

@ -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() {