Skip to content

Instantly share code, notes, and snippets.

@alces
Created July 17, 2017 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alces/1c45c11ad6678ad4905c0ed1e85fc3ae to your computer and use it in GitHub Desktop.
Save alces/1c45c11ad6678ad4905c0ed1e85fc3ae to your computer and use it in GitHub Desktop.
Download dependencies into current directory and remove versions from filenames
apply plugin: 'java'
defaultTasks 'download'
dependencies {
runtime 'org.yaml:snakeyaml:1.18', 'org.mongodb:mongo-java-driver:3.4.2'
}
repositories {
mavenCentral()
}
task download(type: Copy) {
from sourceSets.main.runtimeClasspath
into '.'
rename '(.+)-\\d.+\\.([^.]+)', '$1.$2'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment