group = 'org.xbib' version = '4.0.2' apply plugin: 'java' apply plugin: 'maven' repositories { mavenCentral() mavenLocal() jcenter() maven { url "http://xbib.org/repository" } } configurations { wagon } dependencies { compile "javax.inject:javax.inject:1" compile 'org.xbib:jsr-305:1.0.0' compile "com.google.guava:guava:19.0" testCompile "junit:junit:4.12" testCompile "org.apache.logging.log4j:log4j-slf4j-impl:2.5" testCompile "org.apache.logging.log4j:log4j-core:2.5" testCompile "javax.inject:javax.inject-tck:1" testCompile "com.google.guava:guava-testlib:19.0" wagon 'org.apache.maven.wagon:wagon-ssh-external:2.10' } sourceCompatibility = 1.8 targetCompatibility = 1.8 [compileJava, compileTestJava]*.options.collect { options -> options.encoding = 'UTF-8' options.compilerArgs << '-Xlint:-serial,-path,-rawtypes,-unchecked' } test { exclude '*$*' exclude '**/ErrorHandlingTest*' exclude '**/OSGiContainerTest*' exclude '**/ScopesTest*' exclude '**/TypeConversionTest*' testLogging { showStandardStreams = false exceptionFormat = 'full' } } task sourcesJar(type: Jar, dependsOn: classes) { from sourceSets.main.allSource classifier 'sources' } artifacts { archives sourcesJar } uploadArchives { repositories { if (project.hasProperty("xbibUsername")) { mavenDeployer { configuration = configurations.wagon repository(url: uri('scpexe://xbib.org/repository')) { authentication(userName: xbibUsername, privateKey: xbibPrivateKey) } pom.project { inceptionYear '2016' licenses { license { name 'The Apache Software License, Version 2.0' url 'http://www.apache.org/licenses/LICENSE-2.0.txt' distribution 'repo' } } } } } } }