I have a multi project setup where some subprojects have dependencies to jar files in the local maven repository. After the project is built, all the jar files are copied to an installation directory using a copy task, but this includes only the subproject artefacts.
Root project build.gradle:
File destDir = project.file('dest')
subprojects {
dependencies {
repositories {
mavenLocal()
maven { url '/some/path' }
}
}
}
task myCopy(type: Copy, dependsOn: subprojects.jar) {
from(subprojects.jar)
into project.file(destDir)
}
Subproject build.gradle
dependencies {
compile project(':aaa')
compile project(':bbb')
compile group: 'com.example', name: 'foo-bar', version: '1.2.0'
}
Is there a way to also copy all the jar file dependencies (foo-bar-1.2.0.jar in this example) from the maven repository?
Thanks in advance!