Skip to content

Commit

Permalink
Removes Mockito warning on tests ("Mockito is currently self-attachin…
Browse files Browse the repository at this point in the history
…g to enable the inline-mock-maker.")
  • Loading branch information
rfc3092 committed Feb 28, 2025
1 parent c90e302 commit a8b9971
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion plugins/java/src/main/groovy/dolly-apps.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ tasks.bootJar {

tasks.test {
useJUnitPlatform()
jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED"
doFirst {
jvmArgs += '-javaagent:' + configurations.testRuntimeClasspath.find { it.name.contains("byte-buddy-agent") }
jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED"
}
}

/**
Expand Down
5 changes: 4 additions & 1 deletion plugins/java/src/main/groovy/dolly-libs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,8 @@ repositories {

tasks.test {
useJUnitPlatform()
jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED"
doFirst {
jvmArgs += '-javaagent:' + configurations.testRuntimeClasspath.find { it.name.contains("byte-buddy-agent") }
jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED"
}
}
5 changes: 4 additions & 1 deletion plugins/java/src/main/groovy/dolly-proxies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,8 @@ tasks.bootJar {

tasks.test {
useJUnitPlatform()
jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED"
doFirst {
jvmArgs += '-javaagent:' + configurations.testRuntimeClasspath.find { it.name.contains("byte-buddy-agent") }
jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED"
}
}

0 comments on commit a8b9971

Please sign in to comment.