Skip to content

Commit

Permalink
Avoid robolectric on JDK 1.8
Browse files Browse the repository at this point in the history
Add add-opens and also fails to run.
  • Loading branch information
yschimke committed Dec 31, 2024
1 parent dd5a002 commit 30ae5e7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions okhttp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,18 @@ configure<CheckstyleExtension> {
sourceSets = listOf(project.sourceSets["main"])
}

afterEvaluate {
if (testJavaVersion < 9) {
// Work around robolectric requirements and limitations
tasks.named<Test>("testDebugUnitTest") {
allJvmArgs = allJvmArgs.filter { !it.startsWith("--add-opens") }
filter {
excludeTest("okhttp3.internal.publicsuffix.PublicSuffixDatabaseTest", null)
}
}
}
}

apply(plugin = "io.github.usefulness.maven-sympathy")

mavenPublishing {
Expand Down

0 comments on commit 30ae5e7

Please sign in to comment.