Commit 7ee5eef
committed
build(Gradle): fix Kotlin compilation errors in instrumentation tests
The "Unresolved reference" errors are for hidden symbols from the
prebuilt AOSP's android.jar library, that is not visible anymore in the
instrumentation tests when loaded via compileOnly API.
Since Kotlin 1.8, it's required to explicitly use androidTestCompileOnly
API to load a library for the instrumentation tests. See for more
https://kotlinlang.org/docs/whatsnew18.html#kotlin-multiplatform-a-new-android-source-set-layout
> Task :compileDebugAndroidTestKotlin FAILED
e: file:///mnt/storage/projects/7sim/7sim/tests/androidTest/src/java/com/github/iusmac/sevensim/telephony/SimPinFeederComponentTest.kt:63:52 Unresolved reference: selectableSubscriptionInfoList
e: file:///mnt/storage/projects/7sim/7sim/tests/androidTest/src/java/com/github/iusmac/sevensim/telephony/SimPinFeederComponentTest.kt:63:86 Not enough information to infer type variable T
e: file:///mnt/storage/projects/7sim/7sim/tests/androidTest/src/java/com/github/iusmac/sevensim/telephony/SimPinFeederComponentTest.kt:67:28 Cannot infer a type for this parameter. Please specify it explicitly.
e: file:///mnt/storage/projects/7sim/7sim/tests/androidTest/src/java/com/github/iusmac/sevensim/telephony/SimPinFeederComponentTest.kt:68:68 Unresolved reference: it
e: file:///mnt/storage/projects/7sim/7sim/tests/androidTest/src/java/com/github/iusmac/sevensim/telephony/SimPinFeederComponentTest.kt:69:29 Cannot infer a type for this parameter. Please specify it explicitly.
e: file:///mnt/storage/projects/7sim/7sim/tests/androidTest/src/java/com/github/iusmac/sevensim/telephony/TelephonyControllerComponentTest.kt:58:23 Unresolved reference: SimState
Signed-off-by: iusmac <iusico.maxim@libero.it>1 parent d23b644 commit 7ee5eef
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
290 | 293 | | |
291 | 294 | | |
292 | 295 | | |
293 | | - | |
| 296 | + | |
294 | 297 | | |
295 | 298 | | |
296 | 299 | | |
| |||
0 commit comments