Instantly share code, notes, and snippets.

Embed
What would you like to do?
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