mirror of
https://github.com/android-actions/setup-android.git
synced 2024-11-23 18:12:03 +00:00
Run prettier, to pass format-check
This commit is contained in:
parent
f4de3ae372
commit
469d66c201
3 changed files with 32 additions and 37 deletions
|
@ -1,5 +1,5 @@
|
|||
describe('setup-android', () => {
|
||||
it('has sanity', async () => {
|
||||
expect(true)
|
||||
})
|
||||
})
|
||||
describe('setup-android', () => {
|
||||
it('has sanity', async () => {
|
||||
expect(true)
|
||||
})
|
||||
})
|
||||
|
|
|
@ -25,12 +25,7 @@ export async function install(): Promise<void> {
|
|||
fs.mkdirSync(ANDROID_REPOSITORIES_DIR, {recursive: true})
|
||||
fs.closeSync(fs.openSync(ANDROID_REPOSITORIES_CFG, 'w'))
|
||||
|
||||
const acceptBuffer = Buffer.from(
|
||||
Array(10)
|
||||
.fill('y')
|
||||
.join('\n'),
|
||||
'utf8'
|
||||
)
|
||||
const acceptBuffer = Buffer.from(Array(10).fill('y').join('\n'), 'utf8')
|
||||
let sdkManager = ''
|
||||
|
||||
if (process.platform === 'linux') {
|
||||
|
|
52
src/main.ts
52
src/main.ts
|
@ -1,26 +1,26 @@
|
|||
import * as core from '@actions/core'
|
||||
import * as path from 'path'
|
||||
import {ANDROID_SDK_ROOT, ANNOTATION_MATCHERS} from './constants'
|
||||
import {preGradleCache, preAndroidCache, preGradleWrapper} from './cache'
|
||||
import {install} from './install'
|
||||
|
||||
async function run(): Promise<void> {
|
||||
// process all caching but wait for them to all complete
|
||||
await Promise.all([preGradleWrapper(), preGradleCache(), preAndroidCache()])
|
||||
|
||||
await install()
|
||||
|
||||
core.exportVariable('ANDROID_HOME', ANDROID_SDK_ROOT)
|
||||
core.exportVariable('ANDROID_SDK_ROOT', ANDROID_SDK_ROOT)
|
||||
|
||||
core.addPath(path.join(ANDROID_SDK_ROOT, 'tools', 'bin'))
|
||||
core.addPath(path.join(ANDROID_SDK_ROOT, 'platform-tools'))
|
||||
|
||||
core.debug('add matchers')
|
||||
const matchersPath = path.join(__dirname, '..', '..', '.github')
|
||||
for (const matcher of ANNOTATION_MATCHERS) {
|
||||
console.log(`##[add-matcher]${path.join(matchersPath, matcher)}`)
|
||||
}
|
||||
}
|
||||
|
||||
run()
|
||||
import * as core from '@actions/core'
|
||||
import * as path from 'path'
|
||||
import {ANDROID_SDK_ROOT, ANNOTATION_MATCHERS} from './constants'
|
||||
import {preGradleCache, preAndroidCache, preGradleWrapper} from './cache'
|
||||
import {install} from './install'
|
||||
|
||||
async function run(): Promise<void> {
|
||||
// process all caching but wait for them to all complete
|
||||
await Promise.all([preGradleWrapper(), preGradleCache(), preAndroidCache()])
|
||||
|
||||
await install()
|
||||
|
||||
core.exportVariable('ANDROID_HOME', ANDROID_SDK_ROOT)
|
||||
core.exportVariable('ANDROID_SDK_ROOT', ANDROID_SDK_ROOT)
|
||||
|
||||
core.addPath(path.join(ANDROID_SDK_ROOT, 'tools', 'bin'))
|
||||
core.addPath(path.join(ANDROID_SDK_ROOT, 'platform-tools'))
|
||||
|
||||
core.debug('add matchers')
|
||||
const matchersPath = path.join(__dirname, '..', '..', '.github')
|
||||
for (const matcher of ANNOTATION_MATCHERS) {
|
||||
console.log(`##[add-matcher]${path.join(matchersPath, matcher)}`)
|
||||
}
|
||||
}
|
||||
|
||||
run()
|
||||
|
|
Loading…
Reference in a new issue