Update android.cake
This commit is contained in:
Родитель
1aefe18c70
Коммит
de8f42a664
|
@ -26,7 +26,13 @@ bool DEVICE_BOOT_WAIT = Argument("wait", true);
|
|||
// set up env
|
||||
var ANDROID_SDK_ROOT = Argument("android", EnvironmentVariable("ANDROID_SDK_ROOT") ?? EnvironmentVariable("ANDROID_HOME"));
|
||||
if (string.IsNullOrEmpty(ANDROID_SDK_ROOT)) {
|
||||
throw new Exception("Environment variable 'ANDROID_SDK_ROOT' or 'ANDROID_HOME' must be set to the Android SDK root.");
|
||||
if(!string.IsNullOrEmpty(EnvironmentVariable("ANDROIDSDK")))
|
||||
{
|
||||
ANDROID_SDK_ROOT = EnvironmentVariable("ANDROIDSDK").Replace("/tools/android","")
|
||||
}
|
||||
else {
|
||||
throw new Exception("Environment variable 'ANDROID_SDK_ROOT' or 'ANDROID_HOME' must be set to the Android SDK root.");
|
||||
}
|
||||
}
|
||||
System.Environment.SetEnvironmentVariable("PATH",
|
||||
$"{ANDROID_SDK_ROOT}/tools/bin" + System.IO.Path.PathSeparator +
|
||||
|
|
Загрузка…
Ссылка в новой задаче