guice/build.gradle
2016-01-07 19:22:16 +01:00

90 lines
2.3 KiB
Groovy

def xbibGroup = 'org.xbib'
def xbibVersion = '4.0'
group = xbibGroup
version = xbibVersion
println "Current JVM: " + org.gradle.internal.jvm.Jvm.current()
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 'javax.annotation:javax.annotation-api:1.2'
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(
id: 'xbib.org',
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'
}
}
}
}
}
}
}