1

In a previous post, getting a (potentially complete) list of GroupID:ArtifactID:Version - GAVs - that a maven command would produce was answered.

How could one achieve a similar list or printout (ideally file), for a gradle build?

Community
  • 1
  • 1
Fredrik Wendt
  • 988
  • 1
  • 10
  • 17
  • Did you looked at the dependencies task? You can get the depencies for a given (or all) configurations: ./gradlew dependencies --configuration compile – TobiSH May 10 '16 at 11:07
  • Yes, that's the exact opposite of what I'm looking for. I want a list of artifacts "gradle jar" will produce (not consume). – Fredrik Wendt May 10 '16 at 14:10
  • Ah I completly missed the topic. As far as I know there is no default mechanism to get the result. What you could do is ask a single task for it's output. To do that for all tasks just add this to your gradle file: `tasks.each() {task -> task << { it.outputs.getFiles().each() { resultFiles -> logger.lifecycle("$task.name produced: $resultFiles") } } }` – TobiSH May 11 '16 at 06:16
  • I'm looking at `publishing` and `artifacts` - trying to see if I can find any `SoftwareComponent` objects I can print – Fredrik Wendt May 11 '16 at 15:54

0 Answers0