From 69ef4a987e92cf393aa44679addbe85bc7070648 Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 20 Apr 2023 11:31:45 +0200 Subject: [PATCH] Update CI Java version --- .github/workflows/ci.yml | 25 +++++++++++++++---------- app/build.gradle | 6 +++--- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d12c5a7c..67bd46992 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,10 +44,10 @@ jobs: if: github.event_name == 'pull_request' run: git checkout -B ${{ github.head_ref }} - - name: set up JDK 11 + - name: set up JDK 17 uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 distribution: "temurin" cache: 'gradle' @@ -66,8 +66,13 @@ jobs: timeout-minutes: 20 strategy: matrix: - # api-level 19 is min sdk, but throws errors related to desugaring - api-level: [ 21, 29 ] + include: + - api-level: 21 + target: default + arch: x86 + - api-level: 33 + target: google_apis # emulator API 33 only exists with Google APIs + arch: x86_64 permissions: contents: read @@ -75,10 +80,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: set up JDK 11 + - name: set up JDK 17 uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 17 distribution: "temurin" cache: 'gradle' @@ -86,8 +91,8 @@ jobs: uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} - # workaround to emulator bug: https://github.com/ReactiveCircus/android-emulator-runner/issues/160 - emulator-build: 7425822 + target: ${{ matrix.target }} + arch: ${{ matrix.arch }} script: ./gradlew connectedCheck --stacktrace - name: Upload test report when tests fail # because the printed out stacktrace (console) is too short, see also #7553 @@ -108,10 +113,10 @@ jobs: with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - java-version: 11 # Sonar requires JDK 11 + java-version: 17 distribution: "temurin" cache: 'gradle' diff --git a/app/build.gradle b/app/build.gradle index 6df7214a0..b0cd26dd2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -80,13 +80,13 @@ android { // Flag to enable support for the new language APIs coreLibraryDesugaringEnabled true - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 encoding 'utf-8' } kotlinOptions { - jvmTarget = JavaVersion.VERSION_11 + jvmTarget = JavaVersion.VERSION_17 } sourceSets {