Skip to content

Commit c0eaebe

Browse files
committed
Testing: make 'zipTree' service method access config cache friendly
1 parent d5678b7 commit c0eaebe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/test/groovy/org/gradlex/javamodule/moduleinfo/test/AbstractFunctionalTest.groovy

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,9 +613,10 @@ abstract class AbstractFunctionalTest extends Specification {
613613
}
614614
615615
tasks.named("run") {
616+
val archives = objects.newInstance(ServiceInjection::class.java).archiveOperations
616617
inputs.files(configurations.runtimeClasspath.get().filter {
617618
it.name == "qpid-broker-core-8.0.6-module.jar"
618-
}.elements.map { zipTree(it.single()) })
619+
}.elements.map { archives.zipTree(it.single()) })
619620
doLast {
620621
println(
621622
inputs.files.find {
@@ -624,6 +625,10 @@ abstract class AbstractFunctionalTest extends Specification {
624625
)
625626
}
626627
}
628+
interface ServiceInjection {
629+
@get:Inject
630+
val archiveOperations: ArchiveOperations
631+
}
627632
"""
628633

629634
when:

0 commit comments

Comments
 (0)