Skip to content

Instantly share code, notes, and snippets.

@nikos
Created December 17, 2012 17:30
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikos/4320123 to your computer and use it in GitHub Desktop.
Save nikos/4320123 to your computer and use it in GitHub Desktop.
Simple (aka minimal) Gradle script to create ZIP archive file and upload to nexus repository (as snapshot or if you modify the version to release)
apply plugin: 'maven'
group = 'de.sample'
version = '0.1-SNAPSHOT'
description = 'My cool tool ...'
task customZip(type: Zip) {
from ('.') {
include 'README.txt'
include '*.py'
include 'samples/*'
into 'cool-tool'
}
baseName = 'cool-tool'
}
artifacts {
archives customZip
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: 'http://nexus:8080/content/repositories/releases') {
authentication(userName: 'release', password: 'secret')
}
snapshotRepository(url: 'http://nexus:8080/content/repositories/snapshots') {
authentication(userName: 'snapshot', password: 'secret')
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment