Skip to content

Commit 1031d15

Browse files
committed
Defer Jar task configuration
1 parent dd34432 commit 1031d15

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib-extra/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,16 @@ for (needsP2 in NEEDS_P2_DEPS) {
5656
add("${needsP2}CompileOnly", "dev.equo.ide:solstice:${VER_SOLSTICE}")
5757
}
5858
}
59-
jar {
59+
60+
def jar = tasks.named('jar', Jar) {
6061
for (needsP2 in NEEDS_P2_DEPS) {
61-
from sourceSets.getByName(needsP2).output.classesDirs
62+
from sourceSets.named(needsP2).map { it.output.classesDirs }
6263
}
6364
}
65+
6466
tasks.withType(Test).configureEach {
6567
dependsOn jar
66-
doFirst {
67-
classpath += jar.outputs.files
68-
}
68+
classpath += jar.get().outputs.files
6969
}
7070

7171
apply plugin: 'dev.equo.p2deps'

0 commit comments

Comments
 (0)