refactor!: drop support for android SDK tool (#1083)

* refactor(emulator)!: remove support for legacy `android` binary
`emulator.list_images` now always uses the `avdmanager` binary.
* refactor(android_sdk)!: remove support for legacy `android` binary
`android_sdk.list_targets` now always uses the `avdmanager` binary.
* refactor(check_reqs)!: do not look for legacy `android` binary
* refactor: replace installation instructions involving `android` binary
This commit is contained in:
Raphael von der Grün
2021-04-13 12:16:43 +02:00
committed by GitHub
parent 2a92c77772
commit 9c3195c1ee
8 changed files with 7 additions and 341 deletions
+1 -29
View File
@@ -100,34 +100,6 @@ describe('check_reqs', function () {
return path;
});
});
it('should set ANDROID_SDK_ROOT based on `android` command if command exists in a SDK-like directory structure', () => {
spyOn(fs, 'existsSync').and.returnValue(true);
spyOn(which, 'sync').and.callFake(function (cmd) {
if (cmd === 'android') {
return '/android/sdk/tools/android';
} else {
return null;
}
});
return check_reqs.check_android().then(function () {
expect(process.env.ANDROID_SDK_ROOT).toEqual('/android/sdk');
});
});
it('should error out if `android` command exists in a non-SDK-like directory structure', () => {
spyOn(which, 'sync').and.callFake(function (cmd) {
if (cmd === 'android') {
return '/just/some/random/path/android';
} else {
return null;
}
});
return check_reqs.check_android().then(() => {
fail('Expected promise to be rejected');
}, err => {
expect(err).toEqual(jasmine.any(Error));
expect(err.message).toContain('update your PATH to include valid path');
});
});
it('should set ANDROID_SDK_ROOT based on `adb` command if command exists in a SDK-like directory structure', () => {
spyOn(fs, 'existsSync').and.returnValue(true);
spyOn(which, 'sync').and.callFake(function (cmd) {
@@ -398,7 +370,7 @@ describe('check_reqs', function () {
fail('Expected promise to be rejected');
}, err => {
expect(err).toEqual(jasmine.any(Error));
expect(err.message).toContain('Please install Android target');
expect(err.message).toContain('Please install the Android SDK Platform');
});
});
});