52 Commits

Author SHA1 Message Date
dependabot[bot]
13f81365a4 Bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 03:55:25 +03:00
Vilius Sutkus '89
110787489d [README.md] Update JDK version in step name 2023-09-25 03:53:50 +03:00
Vilius Sutkus '89
4ba30747dc [CI] Use Temurin JDK. Adopt JDK is discontinued
( according to https://github.com/actions/setup-java#supported-distributions )
2023-09-25 03:53:00 +03:00
Omar Shehata
a3da945276 Fix README example 2023-09-25 03:48:44 +03:00
Vilius Sutkus '89
1cb03f027b Update node dependencies & Rebuild 2023-09-25 03:37:15 +03:00
Vilius Sutkus '89
ccc0939481 Use Node-20 instead of end-of-life Node-16
Would prefer to use Node-18, because it's LTS, but I can't, because it's not available:
https://github.com/actions/runner-images/discussions/7664
2023-09-25 03:20:06 +03:00
Vilius Sutkus '89
fabcc053ca [CI] Add macos-13 to test matrix 2023-09-25 03:14:01 +03:00
Vilius Sutkus '89
bee5ac3f90 Update cmdline-tools to 11.0 (latest) 2023-09-25 03:04:50 +03:00
Vilius Sutkus '89
26c86ac3f5 Update JDK to 17 (from 1.8). Required for current cmdline-tools 2023-09-25 03:03:19 +03:00
Vilius Sutkus '89
bc52f43eb3 [CI] Remove ubuntu-18.04 from test matrix 2023-09-25 03:02:55 +03:00
Simon Marquis
899d70efad Update commandlinetools version to 9.0 (latest)
https://developer.android.com/studio#command-line-tools-only
2023-09-25 02:57:03 +03:00
Vilius Sutkus '89
7c5672355a Rebuild 2022-10-18 22:49:38 +03:00
Vilius Sutkus '89
be14762587 Update dependencies 2022-10-18 22:48:21 +03:00
dependabot[bot]
02a4c0fae6 Bump @actions/cache from 3.0.0 to 3.0.5
Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 3.0.0 to 3.0.5.
- [Release notes](https://github.com/actions/toolkit/releases)
- [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>
2022-10-18 22:35:00 +03:00
dependabot[bot]
4963c9b31a Bump @actions/core from 1.9.0 to 1.10.0
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-18 22:32:16 +03:00
Vilius Sutkus '89
2741e25473 Update README.md 2022-08-03 16:44:44 +03:00
Vilius Sutkus '89
ed89994087 Merge branch 'main' of github.com:android-actions/setup-android 2022-08-03 16:38:34 +03:00
Vilius Sutkus '89
240c9729bd Downgrade @types/node to 16, because we are using node LTS - 16. 2022-08-03 16:14:58 +03:00
Vilius Sutkus '89
36d0d24ca4 Update dependencies 2022-08-03 16:09:19 +03:00
Vilius Sutkus '89
cabf29c9ef [CI] Update "rebuild needed" check 2022-08-03 15:56:56 +03:00
Vilius Sutkus '89
65b8c7bc99 [CI] Add a "rebuild needed" check 2022-08-03 15:27:53 +03:00
Vilius Sutkus '89
34f33aad26 Use Node16 (current LTS), instead of Node12 2022-08-03 15:23:56 +03:00
Vilius Sutkus '89
3d201fcd51 Update cmdline-tools version to 7.0 2022-08-03 15:19:19 +03:00
Vilius Sutkus '89
1ba064a8a2 [2/2] Read version of cmdline-tools/latest, if version is correct - use it 2022-08-03 15:19:19 +03:00
Vilius Sutkus '89
4360e92aa0 Read version of cmdline-tools/latest, if version is correct - use it 2022-08-03 15:19:19 +03:00
Vilius Sutkus '89
88c04cbb34 [CI] Remove macos-10.15, because it is deprecated 2022-08-03 15:19:19 +03:00
Vilius Sutkus '89
239c6f5c7c [CI] Update test matrix to include ubuntu-22.04 and macos-12 2022-08-03 15:19:19 +03:00
Vilius Sutkus '89
882b1d3cd5 Update cmdline-tools version to 7.0 2022-08-03 15:03:16 +03:00
Vilius Sutkus '89
00dbb341f0 [2/2] Read version of cmdline-tools/latest, if version is correct - use it 2022-08-03 15:02:48 +03:00
Vilius Sutkus '89
c1ac9c4be4 Read version of cmdline-tools/latest, if version is correct - use it 2022-08-03 15:00:44 +03:00
Vilius Sutkus '89
0f0da39d59 [CI] Remove macos-10.15, because it is deprecated 2022-08-03 13:39:25 +03:00
Vilius Sutkus '89
c6c2260dde [CI] Update test matrix to include ubuntu-22.04 and macos-12 2022-08-03 13:36:32 +03:00
Vilius Sutkus '89
47ea489789 [CI] Disable run.yml 2022-04-22 06:28:18 +03:00
Vilius Sutkus '89
244317f5bb Rebuild dist/index.js after dependency update 2022-04-22 06:25:41 +03:00
Vilius Sutkus '89
5440ded976 [ESLint] warn instead of error about English text in string literals 2022-04-22 06:24:03 +03:00
Vilius Sutkus '89
e94bbf69b5 Update npm dependencies 2022-04-22 06:18:23 +03:00
Vilius Sutkus '89
98f14d164f [CI][README.md] Update setup-java to v3 2022-04-22 05:44:03 +03:00
Vilius Sutkus '89
f56c207000 [CI] Update actions/setup-node to v3 (sliding version, instead of 2.2.2) 2022-04-22 05:41:02 +03:00
Vilius Sutkus '89
a7d36b05d1 [CI][README.MD] Update actions/checkout to v3 2022-04-22 05:38:58 +03:00
Vilius Sutkus '89
20bad8a341 [CI][Test] Update OS list 2022-04-22 05:34:57 +03:00
Mike Hardy
fc91ea75c1 build(deps): bump tools version to v6 / 8092744 2022-04-22 05:22:01 +03:00
Dave Olsthoorn
1685c3d866 workflow: code analysis 2021-07-17 19:13:18 +02:00
Dave Olsthoorn
62d9713f6c workflow: add distribution to setup-java 2021-07-17 19:10:26 +02:00
Dave Olsthoorn
e2a3af499e package.json: bump to version 2021-07-17 19:06:08 +02:00
Dave Olsthoorn
c83cf2fad5 tsconfig: set moduleResolution 2021-07-17 18:55:57 +02:00
dependabot[bot]
39db4a222a Bump @vercel/ncc from 0.27.0 to 0.29.0
Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.27.0 to 0.29.0.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.27.0...0.29.0)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-17 18:51:07 +02:00
dependabot[bot]
69e42af51e Bump fs-extra from 9.1.0 to 10.0.0
Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 9.1.0 to 10.0.0.
- [Release notes](https://github.com/jprichardson/node-fs-extra/releases)
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/9.1.0...10.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-17 18:47:51 +02:00
dependabot[bot]
1eccbc5efd Bump jest-circus from 26.6.3 to 27.0.6
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 26.6.3 to 27.0.6.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.0.6/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-17 18:14:52 +02:00
dependabot[bot]
54a403b145 Bump @types/node from 14.17.5 to 16.3.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.17.5 to 16.3.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-17 18:14:13 +02:00
dependabot[bot]
4bd635e9b7 Bump actions/setup-node from 2.1.5 to 2.2.0
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.1.5 to 2.2.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.1.5...v2.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-17 18:06:56 +02:00
Dave Olsthoorn
7528b5330e build: update build 2021-07-17 18:06:29 +02:00
Dave Olsthoorn
c1a2a96971 package-lock: run npm update 2021-07-17 18:04:48 +02:00
11 changed files with 15654 additions and 10912 deletions

View File

@@ -44,6 +44,7 @@
"semi": "off",
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"i18n-text/no-en": "warn",
"@typescript-eslint/unbound-method": "error"
},
"env": {

View File

@@ -15,26 +15,29 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup node 12
uses: actions/setup-node@v2.1.5
- name: Setup node 20
uses: actions/setup-node@v3
with:
node-version: '12'
node-version: 20
- run: npm ci
- run: npm run build
- name: Check if dist/index.js needs to be rebuilt
run: diff <(git status dist/index.js --short) <(echo -n "")
format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup node 12
uses: actions/setup-node@v2.1.5
- name: Setup node 20
uses: actions/setup-node@v3
with:
node-version: '12'
node-version: 20
- run: npm ci
@@ -43,12 +46,12 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup node 12
uses: actions/setup-node@v2.1.5
- name: Setup node 20
uses: actions/setup-node@v3
with:
node-version: '12'
node-version: 20
- run: npm ci
@@ -59,15 +62,21 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-10.15, windows-2016, windows-2019 ]
os: [ ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, macos-13, windows-2019, windows-2022 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup node 12
uses: actions/setup-node@v2.1.5
- name: Setup node 20
uses: actions/setup-node@v3
with:
node-version: '12'
node-version: 20
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- run: npm ci
- run: npm run build
@@ -79,12 +88,12 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup node 12
uses: actions/setup-node@v2.1.5
- name: Setup node 20
uses: actions/setup-node@v3
with:
node-version: '12'
node-version: 20
- run: npm ci

43
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '44 12 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: 'javascript'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@@ -22,19 +22,24 @@ jobs:
- ubuntu-latest
- windows-latest
- macos-latest
# Disabled, because daveol/SampleApplication is missing
if: ${{ false }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
repository: daveol/SampleApplication
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: ./build/
- name: Set up JDK 1.8
uses: actions/setup-java@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 1.8
java-version: 17
distribution: 'temurin'
- name: Setup Android SDK
id: 'setup-android'

View File

@@ -3,9 +3,18 @@
![Build & Test](https://github.com/android-actions/setup-android/workflows/Build%20&%20Test/badge.svg)
This action sets up the Android SDK tools by:
- Downloading the SDK commandline tools
- Accepting the SDK licenses
- Downloading the SDK commandline tools, if the current version (11.0) is not found in either `$ANDROID_SDK_ROOT` or `$HOME/.android/sdk`.
- Accepting the SDK licenses.
- Installing `tools` and `platform-tools`.
- Adding `platform-tools` (contains adb) and `cmdline-tools/11.0/bin` (contains sdkmanager) to `$PATH`.
- Setting up problem [matchers](/matchers.json).
On Windows 2016 runners, this action also checks if `$ANDROID_SDK_ROOT` path contains spaces.
If it does - it moves SDK to a path without spaces. This is needed because spaces are highly problematic:
```
C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files (x86)\Android\android-sdk\cmdline-tools\3.0\bin\sdkmanager.bat" --licenses"
Error: Could not find or load main class Files
```
# Usage
@@ -14,12 +23,13 @@ See [action.yml](action.yml)
## Basic
```yaml
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 1.8
java-version: '17'
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v2

View File

@@ -3,7 +3,7 @@ author: 'Android-Actions'
description: 'Setup the Android SDK Tools and add them to the path'
runs:
using: 'node12'
using: node20
main: 'dist/index.js'
branding:

8657
dist/index.js vendored

File diff suppressed because it is too large Load Diff

17719
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -25,26 +25,26 @@
"author": "daveol",
"license": "ISC",
"dependencies": {
"@actions/cache": "^1.0.7",
"@actions/core": "^1.3.0",
"@actions/tool-cache": "^1.6.1",
"fs-extra": "^9.1.0"
"@actions/cache": "^3.2.2",
"@actions/core": "^1.10.1",
"@actions/tool-cache": "^2.0.1",
"fs-extra": "^11.1.1"
},
"devDependencies": {
"@types/fs-extra": "^9.0.11",
"@types/jest": "^26.0.23",
"@types/node": "^14.17.1",
"@typescript-eslint/eslint-plugin": "^4.25.0",
"@typescript-eslint/parser": "^4.25.0",
"@vercel/ncc": "^0.27.0",
"eslint": "^7.27.0",
"eslint-plugin-github": "^4.1.3",
"eslint-plugin-jest": "^24.3.6",
"jest": "^26.6.3",
"jest-circus": "^26.6.3",
"@types/fs-extra": "^11.0.2",
"@types/jest": "^29.5.5",
"@types/node": "^20.6.5",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"@vercel/ncc": "^0.38.0",
"eslint": "^8.50.0",
"eslint-plugin-github": "^4.10.0",
"eslint-plugin-jest": "^27.4.0",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"js-yaml": "^4.1.0",
"prettier": "^2.3.0",
"ts-jest": "^26.5.6",
"typescript": "^4.2.4"
"prettier": "^3.0.3",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
}
}

View File

@@ -6,8 +6,8 @@ import * as fs from 'fs'
import * as fse from 'fs-extra'
import * as os from 'os'
const CMDLINE_TOOLS_VERSION = '3.0'
const COMMANDLINE_TOOLS_VERSION = '6858069'
const CMDLINE_TOOLS_VERSION = '11.0'
const COMMANDLINE_TOOLS_VERSION = '10406996'
const COMMANDLINE_TOOLS_WIN_URL = `https://dl.google.com/android/repository/commandlinetools-win-${COMMANDLINE_TOOLS_VERSION}_latest.zip`
const COMMANDLINE_TOOLS_MAC_URL = `https://dl.google.com/android/repository/commandlinetools-mac-${COMMANDLINE_TOOLS_VERSION}_latest.zip`
@@ -48,6 +48,17 @@ function findPreinstalledSdkManager(): {
result.exePath = getSdkManagerPath('latest')
result.isFound = fs.existsSync(result.exePath)
if (result.isFound) {
const propertiesFile = path.join(
ANDROID_SDK_ROOT,
'cmdline-tools',
'latest',
'source.properties'
)
if (fs.existsSync(propertiesFile)) {
result.isCorrectVersion = fs
.readFileSync(propertiesFile, 'utf8')
.includes(`Pkg.Revision=${CMDLINE_TOOLS_VERSION}`)
}
return result
}
result.exePath = ''

View File

@@ -6,7 +6,8 @@
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"moduleResolution": "node"
},
"exclude": ["node_modules", "**/*.test.ts"]
}