Skip to content

Commit

Permalink
Add support for versions 12, 13, and 16
Browse files Browse the repository at this point in the history
  • Loading branch information
warting committed Oct 29, 2024
1 parent 29d7cba commit 04e8fd4
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ jobs:
- ubuntu-20.04
- macos-13
- macos-12
- macos-11
- windows-2022
- windows-2019
cmdline-tools-version:
- 12266719
- 11479570
- 11076708
- 10406996
- 9862592
- 9477386
Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Additional packages can be installed at a later time by calling sdkmanager manua
Command line tools are versioned using two variables - short and long.
Long one is the build number, used in the zip URL, short one is the human friendly version name.

By default, setup-android installs version 10406996 (short version 11.0).
By default, setup-android installs version 12266719 (short version 11.0).

To install a different version, call setup-android with desired long version as the input parameter `cmdline-tools-version`:
```yaml
Expand All @@ -73,12 +73,15 @@ To install a different version, call setup-android with desired long version as

#### Version table
| Short version | Long version |
| --- | --- |
| 11.0 | 10406996 |
| 10.0 | 9862592 |
| 9.0 | 9477386 |
| 8.0 | 9123335 |
| 7.0 | 8512546 |
|---------------| --- |
| 16.0 | 12266719 |
| 13.0 | 11479570 |
| 12.0 | 11076708 |
| 11.0 | 10406996 |
| 10.0 | 9862592 |
| 9.0 | 9477386 |
| 8.0 | 9123335 |
| 7.0 | 8512546 |

Current cmdline tools version can be found at https://developer.android.com/studio#command-line-tools-only

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ inputs:
cmdline-tools-version:
description: 'cmdline-tools-version. See https://developer.android.com/studio#command-line-tools-only'
required: false
default: '10406996'
default: '12266719'

accept-android-sdk-licenses:
description: 'Android SDK is usable only after the license agreement. Should setup-android agree to the licences, provided by "sdkmanager --licenses"'
Expand Down
6 changes: 6 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28824,6 +28824,12 @@ const fs = __importStar(__nccwpck_require__(7147));
const os = __importStar(__nccwpck_require__(2037));
function getVersionShort(versionLong) {
switch (versionLong) {
case '12266719':
return '16.0';
case '11479570':
return '13.0';
case '11076708':
return '12.0';
case '10406996':
return '11.0';
case '9862592':
Expand Down
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import * as os from 'os'

function getVersionShort(versionLong: string): string {
switch (versionLong) {
case '12266719':
return '16.0'
case '11479570':
return '13.0'
case '11076708':
return '12.0'
case '10406996':
return '11.0'
case '9862592':
Expand Down

0 comments on commit 04e8fd4

Please sign in to comment.