I want to download my dependencies to a specific folder in my build as part of my build process e.g. build/lib . I can't find documentation which shows how to do this, I'm sure there is a straightforward way to do it that I'm missing. My current(shortened) build.gradle is the following. The project compiles and executes test correctly.
apply plugin: 'java'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
}
dependencies {
compile(
'aopalliance:aopalliance:1.0',
'log4j:log4j:1.2.17',
'batik:batik-svg-dom:1.6-1')
}
}
I dont know if you tried this, but see if this works
task copyToLib(type: Copy) {
into "$buildDir/output/lib"
from configurations.runtime
}
build.dependsOn copyToLib
It worked for me.
Credit where its due :-) : http://forums.gradle.org/gradle/topics/how_can_i_gather_all_my_projects_dependencies_into_a_folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With