Skip to content

Commit

Permalink
feat(sdk): sdk installation should add latest cmdline-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Malinskiy committed Jan 22, 2024
1 parent 5b22b8c commit a90e8d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion emulator-run-cmd/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export abstract class BaseAndroidSdk implements AndroidSDK {
args += " > /dev/null"
}

await execIgnoreFailure(`bash -c \\\"${this.androidHome()}/cmdline-tools/latest/bin/sdkmanager emulator 'cmdline-tools;latest' platform-tools 'system-images;android-${api};${tag};${abi}'${args}"`);
await execIgnoreFailure(`bash -c \\\"${this.androidHome()}/cmdline-tools/latest/bin/sdkmanager emulator platform-tools 'system-images;android-${api};${tag};${abi}'${args}"`);
}

async installPlatform(api: string, verbose: boolean): Promise<any> {
Expand Down
10 changes: 9 additions & 1 deletion install-sdk/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ export abstract class BaseAndroidSdk implements AndroidSDK {
}).join(':')

core.exportVariable('PATH', `${extraPaths}:${PATH_WITHOUT_ANDROID}`)

let args = ""
if (!verbose) {
args += " > /dev/null"
}

await execIgnoreFailure(`bash -c \\\"${this.androidHome()}/cmdline-tools/bootstrap-version/bin/sdkmanager 'cmdline-tools;latest'`)

return true
}

Expand Down Expand Up @@ -106,7 +114,7 @@ export abstract class BaseAndroidSdk implements AndroidSDK {
args += " > /dev/null"
}

await execIgnoreFailure(`bash -c \\\"${this.androidHome()}/cmdline-tools/bootstrap-version/bin/sdkmanager emulator 'cmdline-tools;latest' platform-tools 'system-images;android-${api};${tag};${abi}'${args}"`);
await execIgnoreFailure(`bash -c \\\"${this.androidHome()}/cmdline-tools/bootstrap-version/bin/sdkmanager emulator platform-tools 'system-images;android-${api};${tag};${abi}'${args}"`);
}

async installPlatform(api: string, verbose: boolean): Promise<any> {
Expand Down

0 comments on commit a90e8d1

Please sign in to comment.