[android] fix android-ndk version

This commit is contained in:
2019-08-23 00:03:45 +03:00
parent e904b46f4a
commit 8205a4cb0c
5 changed files with 22 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ class Android extends Sdk {
constructor(version) {
super(Android.ID, version || Android.VERSION);
this.platform = 19;
}
get prepared() {
@@ -39,7 +40,18 @@ class Android extends Sdk {
}
prepare() {
return super.prepare(0);
const result = [];
result.push(super.prepare(0));
if (!fs.existsSync(path.join(this.ndk_home))) {
result.push(this.prepare_ndk());
}
return Promise.all(result);
}
prepare_ndk() {
const url = 'https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip';
// ToDo: download and extract to `this.ndk_home`
return Promise.resolve();
}
sdkmanager(packages) {
@@ -127,7 +139,8 @@ Android.ID = 'android';
Android.VERSION_25_2_3 = '25.2.3';
Android.VERSION_3859397 = '3859397';
Android.VERSION_4333796 = '4333796';
Android.VERSION = Android.VERSION_3859397;
Android.VERSION = Android.VERSION_4333796;
module.exports = Android;