Skip to content

Commit 718f571

Browse files
committed
fix launching tests
1 parent 27d0f76 commit 718f571

File tree

3 files changed

+2
-22
lines changed

3 files changed

+2
-22
lines changed

app/build.gradle

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -297,23 +297,6 @@ android.applicationVariants.all { variant ->
297297

298298
}
299299

300-
configurations {
301-
// There's an interaction between Gradle's resolution of dependencies with different types
302-
// (@jar, @aar) for `implementation` and `testImplementation` and with Android Studio's built-in
303-
// JUnit test runner. The runtime classpath in the built-in JUnit test runner gets the
304-
// dependency from the `implementation`, which is type @aar, and therefore the JNA dependency
305-
// doesn't provide the JNI dispatch libraries in the correct Java resource directories. I think
306-
// what's happening is that @aar type in `implementation` resolves to the @jar type in
307-
// `testImplementation`, and that it wins the dependency resolution battle.
308-
//
309-
// A workaround is to add a new configuration which depends on the @jar type and to reference
310-
// the underlying JAR file directly in `testImplementation`. This JAR file doesn't resolve to
311-
// the @aar type in `implementation`. This works when invoked via `gradle`, but also sets the
312-
// correct runtime classpath when invoked with Android Studio's built-in JUnit test runner.
313-
// Success!
314-
jnaForTest
315-
}
316-
317300
// [Midori] try to exclude all telemetry dependencies
318301
configurations.all {
319302
// Telemetry is a transitive dependency of several necessary dependencies,
@@ -329,9 +312,6 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
329312

330313
dependencies {
331314

332-
jnaForTest Deps.jna
333-
testImplementation files(configurations.jnaForTest.copyRecursive().files)
334-
335315
implementation Deps.mozilla_browser_engine_gecko
336316

337317
implementation Deps.kotlin_stdlib

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ org.gradle.parallel=true
1515
kotlin.code.style=official
1616
android.useAndroidX=true
1717
android.enableJetifier=false
18-
org.gradle.configuration-cache=true
18+
#org.gradle.configuration-cache=true
1919
# Enables copying of Jetpack Benchmark results from the device to the build directory.
2020
android.enableAdditionalTestOutput=true
2121
android.nonTransitiveRClass=false

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)