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

后端 未结 4 815
甜味超标
甜味超标 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条回答
  •  抹茶落季
    2020-12-01 16:50

    the dependency configuration of compile is deprecated in gradle 4.x. You need to replace that with default. So the above code-snippet becomes:

    dependencies {
      implementation 'com.google.inject:guice:4.0-beta5'
    }
    task copyDependencies(type: Copy) {
      from configurations.default
      into 'dependencies'
    }
    

提交回复
热议问题