DirtyMikeAndTheBoys
DirtyMikeAndTheBoys

Reputation: 1077

Gradle: how to resolve dependencies to a specific folder

In Gradle, I'd like to take all the compile and runtime dependencies closure and have the entire (transitive) dependency graph resolved/copied to a specific folder on my file system.

Let's say this folder is ~/mydeps.

How can I tell Gradle to fetch all the appropriate libs from the local Gradle cache (or remotely) and copy them to this folder?

Upvotes: 0

Views: 527

Answers (1)

Peter Niederwieser
Peter Niederwieser

Reputation: 123986

task copyDeps(type: Copy) {
    from configurations.runtime
    into "${System.getProperty("user.home")}/mydeps"
}

Upvotes: 3

Related Questions