From 1031d15db96d159e42614532883d5f1319ffc206 Mon Sep 17 00:00:00 2001 From: Goooler Date: Sun, 26 Nov 2023 15:55:00 +0800 Subject: [PATCH] Defer Jar task configuration --- lib-extra/build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib-extra/build.gradle b/lib-extra/build.gradle index 07135ff726..e6524f76bf 100644 --- a/lib-extra/build.gradle +++ b/lib-extra/build.gradle @@ -56,16 +56,16 @@ for (needsP2 in NEEDS_P2_DEPS) { add("${needsP2}CompileOnly", "dev.equo.ide:solstice:${VER_SOLSTICE}") } } -jar { + +def jar = tasks.named('jar', Jar) { for (needsP2 in NEEDS_P2_DEPS) { - from sourceSets.getByName(needsP2).output.classesDirs + from sourceSets.named(needsP2).map { it.output.classesDirs } } } + tasks.withType(Test).configureEach { dependsOn jar - doFirst { - classpath += jar.outputs.files - } + classpath += jar.get().outputs.files } apply plugin: 'dev.equo.p2deps'