Initial changes for setup-android

This commit is contained in:
Dave Olsthoorn
2020-07-14 17:41:00 +02:00
parent aa16e13db3
commit 47171f7d89
18 changed files with 12997 additions and 88 deletions

View File

@@ -1,58 +1,7 @@
# Android Problem Matchers
# setup-android
For setting up the android sdk in a github-action
Adds common problem matchers for Android builds to GitHub Action workflows. Currently adds support for the following tools:
<!-- TODO: write readme -->
* Kotlin compiler
* Android Lint
* Gradle
This action only configures the problem matchers in order to be compatible with diverse Android workflows.
## Inputs
No inputs are needed.
## Outputs
No outputs are generated apart from configured problem matchers.
## Example usage
In your workflow YAML file add this step:
```yaml
- name: Setup Android problem matchers
uses: jonasb/android-problem-matchers-action@v1
```
Example full workflow definition:
```yaml
name: Android CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup Android problem matchers
uses: jonasb/android-problem-matchers-action@v1
- name: Build Android
run: |
./gradlew build -PisCI=true
```
In order for Android Lint problems (especially warnings) to show up in the logs and be detected, make these changes to `app/build.gradle`:
```groovy
android {
lintOptions {
textReport project.hasProperty('isCI')
textOutput 'stdout'
}
}
```
# Thanks
Based on the project [android-problem-matchers-action](https://github.com/jonasb/android-problem-matchers-action) from [@jonasb](https://github.com/jonasb)