2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

Bug 1823532 - Remove jnaForTest from project Gradle build files.

Also remove the now-unneeded jna dependency inclusion.
This commit is contained in:
Ryan VanderMeulen 2023-03-16 15:49:20 -04:00 committed by mergify[bot]
parent 4c25c69d01
commit 99952d83a6
2 changed files with 0 additions and 23 deletions

View File

@ -458,23 +458,6 @@ nimbus {
experimenterManifest = ".experimenter.yaml"
}
configurations {
// There's an interaction between Gradle's resolution of dependencies with different types
// (@jar, @aar) for `implementation` and `testImplementation` and with Android Studio's built-in
// JUnit test runner. The runtime classpath in the built-in JUnit test runner gets the
// dependency from the `implementation`, which is type @aar, and therefore the JNA dependency
// doesn't provide the JNI dispatch libraries in the correct Java resource directories. I think
// what's happening is that @aar type in `implementation` resolves to the @jar type in
// `testImplementation`, and that it wins the dependency resolution battle.
//
// A workaround is to add a new configuration which depends on the @jar type and to reference
// the underlying JAR file directly in `testImplementation`. This JAR file doesn't resolve to
// the @aar type in `implementation`. This works when invoked via `gradle`, but also sets the
// correct runtime classpath when invoked with Android Studio's built-in JUnit test runner.
// Success!
jnaForTest
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
@ -482,9 +465,6 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
}
dependencies {
jnaForTest FenixDependencies.jna
testImplementation files(configurations.jnaForTest.copyRecursive().files)
implementation project(':browser-engine-gecko')
implementation FenixDependencies.kotlin_coroutines

View File

@ -18,7 +18,6 @@ object FenixVersions {
const val leakcanary = "2.10"
const val osslicenses_plugin = "0.10.4"
const val detekt = "1.19.0"
const val jna = "5.13.0"
const val androidx_activity = "1.6.1"
const val androidx_compose = "1.3.1"
@ -123,8 +122,6 @@ object FenixDependencies {
const val adjust = "com.adjust.sdk:adjust-android:${FenixVersions.adjust}"
const val installreferrer = "com.android.installreferrer:installreferrer:${FenixVersions.installreferrer}"
const val jna = "net.java.dev.jna:jna:${FenixVersions.jna}@jar"
const val junit = "junit:junit:${FenixVersions.junit}"
const val mockk = "io.mockk:mockk:${FenixVersions.mockk}"
const val mockk_android = "io.mockk:mockk-android:${FenixVersions.mockk}"