Search code examples
gradleivyresolve

Gradle task similar to ivy resolve?


I am working on a project on the side of the main project. The main project used to use ivy so my side project can take advantage of the ivy.xmls and do ivy:resolve to solve all dependencies into a cache.

The main project has moved to gradle and I was wondering if there is a task in the gradle API that can populate gradle cache when I only have the gradle build files.


Solution

  • You can accomplish the same thing with Gradle by configuring a task to copy a configuration to a destination.

    task copyDependencies(type: Copy) {
        from configurations.runtime
        into "$buildDir/deps"
    }