Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 20325

Exploding an archive in a CopySpec

$
0
0

Interestingly enough, I stopped using the distribution plugin and custom configuraiton and artifacts in the subprojects and simply defined a copy task:

task dist(type: Copy) {
    from configurations.runtimeClasspath - configurations.providedCompile
    from tasks.withType(Jar)
    into file("$buildDir/dist")
  }

Then from the root project consume it with the following where app is the subproject and an instance of Project

from(app.tasks.dist)
into("apps/$appName/lib")

This doesn’t seem to produce any warning and produces the expected result, but I thought it was bad practice to reach into a subproject’s tasks?


Viewing all articles
Browse latest Browse all 20325

Trending Articles