Skip to content

Instantly share code, notes, and snippets.

@xing5
Created November 5, 2014 16:30
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 xing5/0d5716717f2bc7b26515 to your computer and use it in GitHub Desktop.
Save xing5/0d5716717f2bc7b26515 to your computer and use it in GitHub Desktop.
Initial build.gradle for Java Project
apply plugin: 'java'
apply plugin: 'eclipse'
sourceCompatibility = 1.7
version = '0.1.0'
jar {
baseName = 'the-package-name'
manifest {
attributes 'Implementation-Title': 'title',
'Implementation-Version': version
}
}
task initSourceFolders {
sourceSets*.java.srcDirs*.each { it.mkdirs() }
sourceSets*.resources.srcDirs*.each { it.mkdirs() }
}
repositories {
mavenLocal()
mavenCentral()
//jcenter()
}
dependencies {
//compile 'commons-collections:commons-collections:3.2'
testCompile 'junit:junit:4.+'
}
uploadArchives {
repositories {
flatDir {
dirs 'repos'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment