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
1 changed files with 6 additions and 1 deletions

View File

@ -18,7 +18,12 @@ dependencies {
def getAndroidRuntimeJar() {
def androidHome = new File("$System.env.ANDROID_HOME")
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() {