Skip to content

Commit 78350b0

Browse files
Update Android CI to use JDK 17 and add caching
1 parent 7fd47d7 commit 78350b0

File tree

1 file changed

+33
-13
lines changed

1 file changed

+33
-13
lines changed

.github/workflows/android.yml

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,39 @@ on:
88

99
jobs:
1010
build:
11-
1211
runs-on: ubuntu-latest
1312

1413
steps:
15-
- uses: actions/checkout@v4
16-
- name: set up JDK 11
17-
uses: actions/setup-java@v4
18-
with:
19-
java-version: '11'
20-
distribution: 'temurin'
21-
cache: gradle
22-
23-
- name: Grant execute permission for gradlew
24-
run: chmod +x gradlew
25-
- name: Build with Gradle
26-
run: ./gradlew build
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up JDK 17
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: '17'
20+
distribution: 'temurin'
21+
cache: gradle
22+
23+
- name: Cache Gradle
24+
uses: actions/cache@v4
25+
with:
26+
path: |
27+
~/.gradle/caches
28+
~/.gradle/wrapper
29+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
30+
restore-keys: |
31+
${{ runner.os }}-gradle-
32+
33+
- name: Grant execute permission for gradlew
34+
run: chmod +x gradlew
35+
36+
- name: Build with Gradle
37+
run: ./gradlew assembleDebug
38+
39+
- name: Run unit tests
40+
run: ./gradlew test
41+
42+
- name: Upload Debug APK
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: app-debug
46+
path: app/build/outputs/apk/debug/*.apk

0 commit comments

Comments
 (0)