Skip to content

Commit 84cf046

Browse files
authored
fix: add core library desugaring and update ci workflow to run instrumentation test on more devices (#789)
Fixes ooni/probe#2750 ## Proposed Changes - Enable core library desugaring - Update ci workflow to test on more devices
1 parent e42dc11 commit 84cf046

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/validate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ jobs:
7171

7272
strategy:
7373
matrix:
74-
api-level: [ 29 ]
75-
target: [ google_apis ]
74+
api-level: [25, 29] # Bug in API 21-24
75+
target: [default, google_apis]
7676

7777
steps:
7878
- name: Set up JDK 17

app/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ android {
111111
compileOptions {
112112
sourceCompatibility JavaVersion.VERSION_17
113113
targetCompatibility JavaVersion.VERSION_17
114+
coreLibraryDesugaringEnabled = true
114115
}
115116
kotlinOptions {
116117
jvmTarget = JavaVersion.VERSION_17
@@ -125,6 +126,9 @@ android {
125126
dependencies {
126127
implementation project(path: ':engine')
127128

129+
// Desugaring
130+
coreLibraryDesugaring(libs.desugar.jdk.libs.nio)
131+
128132
// AndroidX
129133
implementation libs.androidx.appcompat
130134
implementation libs.androidx.constraintlayout

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
androidGradlePlugin = "8.5.1"
33
barista = "3.9.0"
44
countlySdk = "24.7.0"
5+
desugar_jdk_libs_nio = "2.0.4"
56
faker = "2.0.4"
67
mockito = "5.12.0"
78
robolectric = "4.13"
@@ -55,6 +56,7 @@ gms-googleServices = "4.4.1"
5556
android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }
5657
barista = { module = "com.schibsted.spain:barista", version.ref = "barista" }
5758
countly-sdk = { module = "ly.count.android:sdk", version.ref = "countlySdk" }
59+
desugar_jdk_libs_nio = { module = "com.android.tools:desugar_jdk_libs_nio", version.ref = "desugar_jdk_libs_nio" }
5860
faker = { module = "com.github.blocoio:faker", version.ref = "faker" }
5961
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
6062
fastlane-screengrab = { module = "tools.fastlane:screengrab", version.ref = "fastlaneScreengrab" }

0 commit comments

Comments
 (0)