Skip to content

Instantly share code, notes, and snippets.

@DrPlantabyte
Created July 20, 2017 11:23
Show Gist options
  • Save DrPlantabyte/edf1900be66464a86cea41738f359942 to your computer and use it in GitHub Desktop.
Save DrPlantabyte/edf1900be66464a86cea41738f359942 to your computer and use it in GitHub Desktop.
A simple gradle build file that you can drop into your typical Netbeans java project to build the jar using gradle from the command-line.
apply plugin: 'java'
libsDirName = '../dist'
docsDirName = '../dist'
sourceSets {
main {
java {
srcDirs = ['src']
}
}
}
javadoc {
failOnError = false // permissive javadoc generation
}
repositories {
flatDir {
dirs 'lib' // add libraries folder to build path
}
// jcenter() // repo for "standard" java tools like JUnit
// mavenCentral() // repo with lots of LGPL/MIT/Apache open source libraries
}
dependencies {
//testCompile "junit:junit:+"
// import xxx.jar from the libraries folder:
//compile name: 'xxx'
// import artifactId "libname" in groupId "zzz.xyz" from Maven repository:
//compile "zzz.xyz:libname:version"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment