Skip to content

Commit

Permalink
Update CI Java version
Browse files Browse the repository at this point in the history
  • Loading branch information
Stypox committed Apr 20, 2023
1 parent 78e1e05 commit 0dbb8a7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -66,26 +66,33 @@ 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

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'

- name: Run android tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
# workaround to emulator bug: https://github.com/ReactiveCircus/android-emulator-runner/issues/160
emulator-build: 7425822
script: ./gradlew connectedCheck --stacktrace
Expand All @@ -108,10 +115,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'

Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0dbb8a7

Please sign in to comment.