Gradle equivalent to Maven's “copy-dependencies”?

后端 未结 4 826
甜味超标
甜味超标 2020-12-01 16:20

In Maven-land, anytime I want to simply pull down the transitive dependencies for a particular POM file, I just open a shell, navigate to where the POM is located, and run:<

4条回答
  •  猫巷女王i
    2020-12-01 16:57

    This is the equivalent Kotlin DSL version (added the buildDir prefix to make it copy the dependencies in the build folder):

    task("copyDependencies", Copy::class) {
        from(configurations.default).into("$buildDir/dependencies")
    }
    

提交回复
热议问题