Skip to content

Commit

Permalink
Update Android build tools to 30.0.3 (#475)
Browse files Browse the repository at this point in the history
- Tested on MacOS, Windows and Linux (via WSL)
  • Loading branch information
andreban authored Mar 2, 2021
1 parent 1b278d3 commit 047cb84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/lib/androidSdk/AndroidSdkTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {Log, ConsoleLog} from '../../lib/Log';
import {Result} from '../../lib/Result';
import {ValidatePathError} from '../errors/ValidatePathError';

const BUILD_TOOLS_VERSION = '29.0.2';
export const BUILD_TOOLS_VERSION = '30.0.3';

/**
* Wraps functionality of the Android SDK Tools and allows them to be invoked programatically.
Expand Down
12 changes: 7 additions & 5 deletions packages/core/src/spec/lib/androidSdk/AndroidSdkToolsSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import {Config} from '../../../lib/Config';
import {JdkHelper} from '../../../lib/jdk/JdkHelper';
import {AndroidSdkTools} from '../../../lib/androidSdk/AndroidSdkTools';
import {AndroidSdkTools, BUILD_TOOLS_VERSION} from '../../../lib/androidSdk/AndroidSdkTools';
import util = require('../../../lib/util');
import * as fs from 'fs';
import {MockLog} from '../../../lib/mock/MockLog';
Expand Down Expand Up @@ -129,7 +129,9 @@ describe('AndroidSdkTools', () => {
await androidSdkTools.installBuildTools();
expect(util.execInteractive).toHaveBeenCalledWith(
test.expectedCwd,
['--install', '"build-tools;29.0.2"', `--sdk_root=${test.expectedSdkRoot}`],
['--install',
`"build-tools;${BUILD_TOOLS_VERSION}"`,
`--sdk_root=${test.expectedSdkRoot}`],
androidSdkTools.getEnv());
});
});
Expand Down Expand Up @@ -209,7 +211,7 @@ describe('AndroidSdkTools', () => {
describe('#apksigner', () => {
const tests = [
{platform: 'linux',
expectedCmd: '/home/user/android-sdk/build-tools/29.0.2/apksigner',
expectedCmd: `/home/user/android-sdk/build-tools/${BUILD_TOOLS_VERSION}/apksigner`,
expectedArgs: [
'sign', '--ks', '/path/to/keystore.ks',
'--ks-key-alias', 'alias',
Expand All @@ -219,7 +221,7 @@ describe('AndroidSdkTools', () => {
'unsigned.apk',
]},
{platform: 'darwin',
expectedCmd: '/home/user/android-sdk/build-tools/29.0.2/apksigner',
expectedCmd: `/home/user/android-sdk/build-tools/${BUILD_TOOLS_VERSION}/apksigner`,
expectedArgs: [
'sign', '--ks', '/path/to/keystore.ks',
'--ks-key-alias', 'alias',
Expand All @@ -234,7 +236,7 @@ describe('AndroidSdkTools', () => {
'-Xmx1024M',
'-Xss1m',
'-jar',
'C:\\Users\\user\\android-sdk\\build-tools\\29.0.2\\lib\\apksigner.jar',
`C:\\Users\\user\\android-sdk\\build-tools\\${BUILD_TOOLS_VERSION}\\lib\\apksigner.jar`,
'sign', '--ks', '/path/to/keystore.ks',
'--ks-key-alias', 'alias',
'--ks-pass', 'pass:kspass',
Expand Down

0 comments on commit 047cb84

Please sign in to comment.