mirror of
https://gitea.com/actions/setup-android.git
synced 2025-12-24 07:58:22 +00:00
Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47ea489789 | ||
|
|
244317f5bb | ||
|
|
5440ded976 | ||
|
|
e94bbf69b5 | ||
|
|
98f14d164f | ||
|
|
f56c207000 | ||
|
|
a7d36b05d1 | ||
|
|
20bad8a341 | ||
|
|
fc91ea75c1 | ||
|
|
1685c3d866 | ||
|
|
62d9713f6c | ||
|
|
e2a3af499e | ||
|
|
c83cf2fad5 | ||
|
|
39db4a222a | ||
|
|
69e42af51e | ||
|
|
1eccbc5efd | ||
|
|
54a403b145 | ||
|
|
4bd635e9b7 | ||
|
|
7528b5330e | ||
|
|
c1a2a96971 | ||
|
|
a812d70a1a | ||
|
|
9bd8ed6b1f | ||
|
|
ecf659ded2 | ||
|
|
8f636b1085 | ||
|
|
be688ab050 | ||
|
|
2842aed41c | ||
|
|
bc065618ae | ||
|
|
2d34867f5a | ||
|
|
2469709471 | ||
|
|
3404b45d4c | ||
|
|
161f0b2707 | ||
|
|
ae8a1c8d80 | ||
|
|
e458de9c46 | ||
|
|
da1ab05e31 | ||
|
|
910b2809b6 | ||
|
|
7fc55be752 | ||
|
|
36160f0297 | ||
|
|
46ed96d180 | ||
|
|
57a1f875c4 | ||
|
|
cee829806b | ||
|
|
a83cba80ae | ||
|
|
53fbf5011f | ||
|
|
ef1614e11f | ||
|
|
7506bcd002 |
@@ -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": {
|
||||
|
||||
22
.github/workflows/build-test.yml
vendored
22
.github/workflows/build-test.yml
vendored
@@ -15,10 +15,10 @@ 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.4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '12'
|
||||
|
||||
@@ -29,10 +29,10 @@ jobs:
|
||||
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.4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '12'
|
||||
|
||||
@@ -43,10 +43,10 @@ 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.4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '12'
|
||||
|
||||
@@ -59,13 +59,13 @@ 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-18.04, ubuntu-20.04, macos-10.15, macos-11, windows-2019, windows-2022 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup node 12
|
||||
uses: actions/setup-node@v2.1.4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '12'
|
||||
|
||||
@@ -79,10 +79,10 @@ 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.4
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '12'
|
||||
|
||||
|
||||
43
.github/workflows/codeql-analysis.yml
vendored
Normal file
43
.github/workflows/codeql-analysis.yml
vendored
Normal 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@v1
|
||||
with:
|
||||
languages: 'javascript'
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
11
.github/workflows/run.yml
vendored
11
.github/workflows/run.yml
vendored
@@ -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@v1
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 1.8
|
||||
distribution: 'adopt'
|
||||
|
||||
- name: Setup Android SDK
|
||||
id: 'setup-android'
|
||||
|
||||
@@ -14,10 +14,10 @@ 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
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
|
||||
8878
dist/index.js
vendored
8878
dist/index.js
vendored
File diff suppressed because one or more lines are too long
15636
package-lock.json
generated
15636
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
38
package.json
38
package.json
@@ -5,7 +5,7 @@
|
||||
"description": "setup android action",
|
||||
"main": "lib/main.js",
|
||||
"scripts": {
|
||||
"build": "ncc build src/main.ts --out dist/ --minify",
|
||||
"build": "ncc build src/main.ts --out dist/",
|
||||
"format": "prettier --write **/*.ts",
|
||||
"format-check": "prettier --check **/*.ts",
|
||||
"lint": "eslint src/*.ts",
|
||||
@@ -25,26 +25,26 @@
|
||||
"author": "daveol",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^1.0.6",
|
||||
"@actions/core": "^1.2.6",
|
||||
"@actions/cache": "^2.0.2",
|
||||
"@actions/core": "^1.3.0",
|
||||
"@actions/tool-cache": "^1.6.1",
|
||||
"fs-extra": "^9.1.0"
|
||||
"fs-extra": "^10.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^26.0.20",
|
||||
"@types/node": "^14.14.31",
|
||||
"@typescript-eslint/eslint-plugin": "^4.15.1",
|
||||
"@typescript-eslint/parser": "^4.15.1",
|
||||
"@types/fs-extra": "^9.0.6",
|
||||
"@zeit/ncc": "^0.22.3",
|
||||
"eslint": "^7.20.0",
|
||||
"eslint-plugin-github": "^4.1.1",
|
||||
"eslint-plugin-jest": "^24.1.5",
|
||||
"jest": "^26.6.3",
|
||||
"jest-circus": "^26.6.3",
|
||||
"js-yaml": "^3.14.1",
|
||||
"prettier": "^2.2.1",
|
||||
"ts-jest": "^26.5.1",
|
||||
"typescript": "^4.1.5"
|
||||
"@types/fs-extra": "^9.0.11",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/node": "^17.0.25",
|
||||
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
||||
"@typescript-eslint/parser": "^5.20.0",
|
||||
"@vercel/ncc": "^0.33.4",
|
||||
"eslint": "^8.13.0",
|
||||
"eslint-plugin-github": "^4.3.6",
|
||||
"eslint-plugin-jest": "^26.1.4",
|
||||
"jest": "^27.5.1",
|
||||
"jest-circus": "^27.0.6",
|
||||
"js-yaml": "^4.1.0",
|
||||
"prettier": "^2.3.0",
|
||||
"ts-jest": "^27.1.4",
|
||||
"typescript": "^4.2.4"
|
||||
}
|
||||
}
|
||||
|
||||
11
src/main.ts
11
src/main.ts
@@ -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 = '6.0'
|
||||
const COMMANDLINE_TOOLS_VERSION = '8092744'
|
||||
|
||||
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`
|
||||
@@ -117,8 +117,13 @@ async function installSdkManager(): Promise<string> {
|
||||
CMDLINE_TOOLS_VERSION
|
||||
)
|
||||
|
||||
// Create parent directory
|
||||
fs.mkdirSync(path.dirname(desiredLocation), {recursive: true})
|
||||
// @TODO: use io.mv instead of fs-extra once following issue is resolved:
|
||||
|
||||
// Make sure we don't have leftover target directory (happens sometimes...)
|
||||
if (fs.existsSync(desiredLocation)) fse.removeSync(desiredLocation)
|
||||
|
||||
// @TODO: use io.mv instead of fs-extra.moveSync once following issue is resolved:
|
||||
// https://github.com/actions/toolkit/issues/706
|
||||
fse.moveSync(
|
||||
path.join(cmdlineToolsExtractedLocation, 'cmdline-tools'),
|
||||
|
||||
@@ -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"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user