apply plugin: 'application' apply plugin: 'eclipse' apply plugin: 'findbugs' apply plugin: 'jacoco' apply plugin: 'java' apply plugin: 'jdepend' apply plugin: 'maven' group = 'de.krismer' status = 'snapshot' version = '1.0' sourceCompatibility = '1.7' targetCompatibility = '1.7' mainClassName = 'de.krismer.neo4j.Neo4jOsmImporter' repositories { mavenCentral() maven { // Look for POMs and artifacts, such as JARs, here url 'http://m2.neo4j.org/content/repositories/releases' artifactUrls 'http://download.osgeo.org/webdav/geotools/' } } buildscript { apply from: 'http://www.krismer.de/files/checkstyle.gradle' } dependencies { // compile dependencies compile group: 'org.neo4j', name: 'neo4j-spatial', version: '0.11-neo4j-1.9' compile group: 'org.neo4j', name: 'neo4j-rest-graphdb', version: '1.9' compile group: 'javax.measure', name: 'jsr-275', version: '0.9.0' compile 'nl.cloudfarming.client:lib-geotools:2.7.5' compile 'com.tinkerpop.gremlin:gremlin-groovy:2.3+' // dependencies for maven repository deployment archives 'org.apache.maven.wagon:wagon-http:2.2' // test dependencies testCompile 'org.testng:testng:6+' } checkstyle { showViolations = false } jar { description = 'Builds a jar file (without libraries)' appendix = 'dynamic' manifest { def manifestClasspath = configurations.runtime.collect { it.getName() }.join(',') attributes('Class-Path': manifestClasspath, 'Main-Class': mainClassName) } } test { useTestNG() } uploadArchives { repositories.mavenDeployer { repository(url: repositoryPrefix + 'releases') { authentication(userName: repositoryUsername, password: repositoryPassword) } snapshotRepository(url: repositoryPrefix + 'snapshots') { authentication(userName: repositoryUsername, password: repositoryPassword) } } } task javadocJar(type: Jar, dependsOn: javadoc) { description = 'Builds a jar file including javadoc' appendix = 'javadoc' from javadoc.destinationDir } task sourcesJar(type: Jar, dependsOn: classes) { description = 'Builds a jar file including sources' appendix = 'sources' from sourceSets.main.allSource } task staticJar(type: Jar) { description = 'Builds a jar file including all libraries' appendix = 'static' from sourceSets.main.output from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } manifest { attributes('Main-Class': mainClassName) } } task staticTestJar(type: Jar) { description = 'Builds a jar file including all libraries and test classes' appendix = 'staticWithTests' from sourceSets.main.output from sourceSets.test.output from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } manifest { attributes('Main-Class': mainClassName) } } task packageAll(dependsOn: [jar, javadocJar, sourcesJar, staticJar, staticTestJar, distZip, distTar])