From 445684cb497720f182f9f99e8c120c0dc05b0950 Mon Sep 17 00:00:00 2001 From: Jonas Bengtsson Date: Fri, 3 Jan 2020 21:18:34 +0100 Subject: [PATCH] Extend README --- README.md | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d8df67..09d9ea7 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,45 @@ No inputs are needed. ## Outputs -No outputs are generated apart from configured problem matchers. \ No newline at end of file +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' + } +} +```