14 Commits

Author SHA1 Message Date
Vilius Sutkus '89
00854ea68c Update dependencies and rebuild 2024-04-05 13:59:39 +03:00
dependabot[bot]
0d0e8c3af6 Bump typescript from 5.3.2 to 5.4.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.3.2 to 5.4.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.2...v5.4.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 13:50:43 +03:00
dependabot[bot]
a9d7b728b4 Bump eslint-plugin-github from 4.10.1 to 4.10.2
Bumps [eslint-plugin-github](https://github.com/github/eslint-plugin-github) from 4.10.1 to 4.10.2.
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v4.10.1...v4.10.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 13:44:38 +03:00
dependabot[bot]
93337aeebc Bump actions/setup-java from 3 to 4
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 13:43:55 +03:00
dependabot[bot]
c39b220a9b Bump ts-jest from 29.1.1 to 29.1.2
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.1.1 to 29.1.2.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.1.1...v29.1.2)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-22 13:07:30 +02:00
dependabot[bot]
76b557c697 Bump @actions/cache from 3.2.2 to 3.2.4
Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 3.2.2 to 3.2.4.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

---
updated-dependencies:
- dependency-name: "@actions/cache"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-22 11:45:06 +02:00
dependabot[bot]
b7334e0985 Bump prettier from 3.1.0 to 3.2.5
Bumps [prettier](https://github.com/prettier/prettier) from 3.1.0 to 3.2.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.1.0...3.2.5)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-22 11:44:08 +02:00
dependabot[bot]
8252dc7232 Bump eslint-plugin-jest from 27.6.0 to 27.9.0
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.6.0 to 27.9.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.6.0...v27.9.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-22 11:42:51 +02:00
Vilius Sutkus '89
07976c6290 [CI] Don't log licenses 2023-11-25 18:10:19 +02:00
Vilius Sutkus '89
56927e38e2 Update npm dependencies 2023-11-25 18:04:24 +02:00
Vilius Sutkus '89
eb7920b260 Implement action input parameter 'packages' 2023-11-25 17:41:26 +02:00
Vilius Sutkus '89
a86cdbf03d [CI] Call this action by calling action.yml
action.yml has default input arguments. Would rather not duplicate them in CI workflow
2023-11-25 17:25:16 +02:00
Vilius Sutkus '89
713cbf481b [README.md] Update wording about licenses 2023-11-25 17:22:28 +02:00
Vilius Sutkus '89
1297b09c09 [CI] List installed packages 2023-11-25 17:21:46 +02:00
8 changed files with 2681 additions and 2224 deletions

View File

@@ -79,7 +79,7 @@ jobs:
node-version: 20
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
@@ -87,11 +87,13 @@ jobs:
- run: npm ci
- run: npm run build
- run: node dist/index.js
env:
INPUT_CMDLINE-TOOLS-VERSION: ${{ matrix.cmdline-tools-version }}
INPUT_ACCEPT-ANDROID-SDK-LICENSES: 'true'
INPUT_LOG-ACCEPTED-ANDROID-SDK-LICENSES: 'false'
- name: Run setup-android
uses: ./
with:
cmdline-tools-version: ${{ matrix.cmdline-tools-version }}
log-accepted-android-sdk-licenses: 'false'
- run: sdkmanager --list_installed
- run: sdkmanager --list

View File

@@ -36,7 +36,7 @@ jobs:
path: ./build/
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'

View File

@@ -39,12 +39,21 @@ steps:
```
## Additional packages
By default, sdkmanager installs "tools" and "platform-tools" packages. To install additional packages, call sdkmanager manually:
Input parameter `packages` controls which packages this action will install from Android SDK.
Default value is `tools platform-tools`, supply an empty string to skip installing additional packages.
Additional packages can be installed at a later time by calling sdkmanager manually.
```yaml
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
packages: ''
- run: sdkmanager "ndk;26.1.10909125" "cmake;3.22.1"
# ...
- run: sdkmanager tools platform-tools
```
## SDK Version selection
@@ -76,7 +85,7 @@ Current cmdline tools version can be found at https://developer.android.com/stud
# Android SDK Licenses
Android SDK (unsurprisingly) is not public domain software, it comes with a license.
Android SDK is not public domain software, it comes with a license.
Input parameter `accept-android-sdk-licenses` decides if Android SDK licenses should be agreed to on behalf of the user of this action.
Default option is 'yes', because otherwise SDK is unusable until said licenses are agreed to.

View File

@@ -18,6 +18,11 @@ inputs:
required: false
default: 'true'
packages:
description: 'Additional packages to install'
required: false
default: 'tools platform-tools'
runs:
using: node20
main: 'dist/index.js'

1243
dist/index.js vendored

File diff suppressed because it is too large Load Diff

3594
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -25,24 +25,24 @@
"author": "daveol",
"license": "ISC",
"dependencies": {
"@actions/cache": "^3.2.2",
"@actions/cache": "^3.2.4",
"@actions/core": "^1.10.1",
"@actions/tool-cache": "^2.0.1"
},
"devDependencies": {
"@types/jest": "^29.5.5",
"@types/node": "^20.6.5",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@vercel/ncc": "^0.38.0",
"eslint": "^8.50.0",
"eslint-plugin-github": "^4.10.0",
"eslint-plugin-jest": "^27.4.0",
"eslint-plugin-github": "^4.10.2",
"eslint-plugin-jest": "^27.9.0",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"js-yaml": "^4.1.0",
"prettier": "^3.0.3",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"typescript": "^5.4.4"
}
}

View File

@@ -156,8 +156,20 @@ async function run(): Promise<void> {
core.getBooleanInput('log-accepted-android-sdk-licenses')
)
}
await callSdkManager(sdkManagerExe, 'tools')
await callSdkManager(sdkManagerExe, 'platform-tools')
const packages = core
.getInput('packages', {required: false})
.split(' ')
.map(function (str) {
return str.trim()
})
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
.filter(function (element, index, array) {
return element
})
for (const pkg of packages) {
await callSdkManager(sdkManagerExe, pkg)
}
core.setOutput('ANDROID_COMMANDLINE_TOOLS_VERSION', VERSION_LONG)
core.exportVariable('ANDROID_HOME', ANDROID_SDK_ROOT)