Skip to content

Commit

Permalink
Defer Jar task configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Nov 26, 2023
1 parent dd34432 commit 1031d15
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib-extra/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 1031d15

Please sign in to comment.