Add support for versions 12, 13, and 16

This commit is contained in:
Stefan Wärting 2024-10-29 20:11:09 +01:00 committed by Vilius Sutkus '89
parent f34c17e4f4
commit 2022e05939
5 changed files with 26 additions and 8 deletions

View file

@ -67,6 +67,9 @@ jobs:
- windows-2022
- windows-2019
cmdline-tools-version:
- 12266719
- 11479570
- 11076708
- 10406996
- 9862592
- 9477386

View file

@ -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
@ -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

View file

@ -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"'

6
dist/index.js vendored
View file

@ -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':

View file

@ -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':