Skip to content

Commit 73f3221

Browse files
committed
trying to build with JDK 17.
1 parent 56d73ea commit 73f3221

File tree

3 files changed

+66
-9
lines changed

3 files changed

+66
-9
lines changed

.github/workflows/android-ci.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,35 @@ jobs:
2121
- name: 🚚 Get latest code
2222
uses: actions/checkout@v3
2323

24-
- name: ☕ Set up JDK 11
24+
- name: Get latest Corretto URL
25+
id: get-latest-corretto-url
26+
run: >-
27+
echo "::set-output name=URL::$(curl -LIs -o /dev/null -w
28+
%{url_effective}
29+
https://corretto.aws/downloads/latest/amazon-corretto-17-x64-linux-jdk.tar.gz)"
30+
31+
- uses: actions/cache@v3
32+
id: corretto-cache
33+
name: Restore Corretto
34+
with:
35+
path: ./amazon-corretto-17-x64-linux-jdk.tar.gz
36+
key: >-
37+
${{ runner.os }}-corretto-${{
38+
steps.get-latest-corretto-url.outputs.___URL }}
39+
40+
- name: Download AWS Corretto
41+
if: steps.corretto-cache.outputs.cache-hit != 'true'
42+
run: >-
43+
wget
44+
https://corretto.aws/downloads/latest/amazon-corretto-17-x64-linux-jdk.tar.gz
45+
46+
- name: ☕ Set up JDK 17
2547
uses: actions/setup-java@v3
2648
with:
27-
java-version: '11'
28-
distribution: 'temurin'
29-
cache: gradle
49+
distribution: jdkfile
50+
java-version: '17'
51+
architecture: x64
52+
jdkFile: ./amazon-corretto-17-x64-linux-jdk.tar.gz
3053

3154
- name: 🔢 Grant execute permission for gradlew
3255
run: chmod +x gradlew

build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Root project build.gradle
22
buildscript {
33
ext {
4+
version_name = '1.1.6'
5+
version_code = 16
46
compile_sdk = 34
57
target_sdk = 34
68
min_sdk = 21
@@ -15,8 +17,13 @@ buildscript {
1517
core_version = '1.10.1'
1618
nav_version = '2.6.0'
1719
junit_version = '4.13.2'
18-
version_name = '1.1.6'
19-
version_code = 16
20+
test_junit_version = '1.1.5'
21+
test_core_version = '1.5.0'
22+
test_monitor_version = '1.6.1'
23+
test_runner_version = '1.5.2'
24+
test_rules_version = '1.5.0'
25+
uiautomator_version = '2.2.0'
26+
espresso_version = '3.5.1'
2027
}
2128
}
2229

mobile/build.gradle

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,37 @@ dependencies {
7777
implementation "androidx.compose.runtime:runtime:$compose_version"
7878
implementation "androidx.compose.ui:ui:$compose_version"
7979

80+
81+
// jUnit
8082
testImplementation "junit:junit:$junit_version"
81-
androidTestImplementation "androidx.test.ext:junit:1.1.5"
82-
androidTestImplementation "androidx.test.uiautomator:uiautomator:2.2.0"
83-
androidTestImplementation "androidx.test.espresso:espresso-core:3.5.1"
83+
84+
// Required for connected tests.
85+
// https://mvnrepository.com/artifact/androidx.test/monitor
86+
debugImplementation "androidx.test:monitor:$test_monitor_version"
87+
88+
// https://mvnrepository.com/artifact/androidx.test.ext
89+
androidTestImplementation "androidx.test.ext:junit:$test_junit_version"
90+
91+
// https://mvnrepository.com/artifact/androidx.test
92+
// https://developer.android.com/jetpack/androidx/releases/test
93+
androidTestImplementation "androidx.test:core:$test_core_version"
94+
androidTestImplementation "androidx.test:runner:$test_runner_version"
95+
androidTestImplementation "androidx.test:rules:$test_rules_version"
96+
97+
// https://mvnrepository.com/artifact/androidx.test.uiautomator/uiautomator
98+
androidTestImplementation "androidx.test.uiautomator:uiautomator:$uiautomator_version"
99+
100+
// Espresso
101+
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
102+
// androidTestImplementation "androidx.test.espresso:espresso-contrib:$espresso_version"
103+
// androidTestImplementation "androidx.test.espresso:espresso-intents:$espresso_version"
104+
// androidTestImplementation "androidx.test.espresso:espresso-accessibility:$espresso_version"
105+
androidTestImplementation "androidx.test.espresso:espresso-web:$espresso_version"
106+
// androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$espresso_version"
107+
108+
// The following dependency can be either "implementation" or "androidTestImplementation",
109+
// depending on whether you want it to appear on your APK's compile classpath or the test APK classpath.
110+
// androidTestImplementation "androidx.test.espresso:espresso-idling-resource:$espresso_version"
84111

85112
// Test rules and transitive dependencies:
86113
androidTestImplementation("androidx.compose.ui:ui-test-junit4:$compose_version")

0 commit comments

Comments
 (0)