Update dependency com.android.tools.build:gradle to v8.7.3 #1773
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Repository | |
on: | |
push: | |
branches: [ "v*" ] | |
pull_request: | |
branches: [ "**" ] | |
jobs: | |
build: | |
name: Build with JDK ${{ matrix.jdk }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
jdk: [ 11, 17 ] | |
steps: | |
- name: Checkout Git repository | |
uses: actions/checkout@v4 | |
- name: Restore local Maven repository | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: tinylog3-jvm-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
tinylog3-jvm-${{ runner.os }}-maven- | |
- name: Download and install JDK ${{ matrix.jdk }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: ${{ matrix.jdk }} | |
- name: Build with Maven | |
run: mvn --batch-mode --update-snapshots verify | |
- name: Upload code coverage report | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
android-tests: | |
name: Tests on Android (API level ${{ matrix.api-level }}) | |
runs-on: macos-13 | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
api-level: [ 26, 33 ] | |
steps: | |
- name: Checkout Git repository | |
uses: actions/checkout@v4 | |
- name: Restore local Maven repository | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: tinylog3-android-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
tinylog3-android-${{ runner.os }}-maven- | |
- name: Restore Gradle caches and wrapper | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: tinylog3-android-${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
tinylog3-android-${{ runner.os }}-gradle- | |
- name: Restore Android virtual device | |
id: avd-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: tinylog3-${{ runner.os }}-avd${{ matrix.api-level }} | |
- name: Download and install JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: Install core and impl artifacts via Maven | |
run: mvn --batch-mode --update-snapshots --also-make --projects :tinylog-core,:tinylog-impl install -DskipTests | |
- name: Set up Android virtual device if not cached | |
uses: reactivecircus/android-emulator-runner@v2 | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
with: | |
api-level: ${{ matrix.api-level }} | |
arch: x86_64 | |
target: ${{ matrix.api-level >= 30 && 'google_apis' || 'default' }} | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
script: echo "Generated AVD snapshot for caching." | |
- name: Run instrumented tests on Android virtual device | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
arch: x86_64 | |
target: ${{ matrix.api-level >= 30 && 'google_apis' || 'default' }} | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
working-directory: ./tinylog-android-tests | |
script: chmod +x ./gradlew && ./gradlew createDebugCoverageReport spotbugsDebug checkstyle | |
- name: Upload code coverage report | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |