Hello,
I’m still getting started with Gradle, but thought I already understood it. For a project I’m using the distribution plugin
, and want to write a task that depends on :installDist
Here is the snippet how I define the task:
allprojects {
apply plugin: "distribution"
/* other stuff */
task integrate(type: Copy) {
group "distribution"
dependsOn ":installDist"
into "$project.rootDir/../integration"
from "$project.buildDir/install/$project.name"
}
}
When I run the integrate task
I expected that :installDist
would be executed first. So that I can copy the files from the install folder to its destination. But the logging says:
:installDist NO-SOURCE
:integrate NO-SOURCE
:org.cap5lut.ds.api:integrate NO-SOURCE
:org.cap5lut.ds.core:integrate NO-SOURCE
:org.cap5lut.ds.runner:integrate NO-SOURCE
BUILD SUCCESSFUL in 0s
It is a multi-project, the main project is still just an empty wrapper, same goes so far for ds.api
and ds.core
. The important part is, that ds.runner
has already some code, so it should not respond with NO-SOURCE
. If I run :installDist
before :integrate
, :integrate
works fine.
What exactly am I doing wrong/did I misunderstand?
Thanks for your help in advance.