blob: bcddbe29b9d4426b5be2cd258c665f73c6a4b14b [file] [log] [blame]
buildscript {
repositories {
jcenter()
mavenCentral()
}
}
plugins {
id "org.sonarqube" version "1.2"
id 'net.saliman.cobertura' version '2.3.0'
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'checkstyle'
group = 'com.intel.jndn.mock'
version = '1.0.3'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
compileJava.options.encoding = 'UTF-8'
repositories {
jcenter()
mavenLocal()
mavenCentral()
}
configurations {
checkstyleConfig
}
dependencies {
compile 'net.named-data:jndn:0.13'
testCompile 'junit:junit:4.12'
testRuntime 'org.slf4j:slf4j-api:1.7.16'
checkstyleConfig "com.puppycrawl.tools:checkstyle:6.15"
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
tasks.withType(Test) {
reports.html.destination = file("${reporting.baseDir}/${name}")
testLogging {
events "passed", "skipped", "failed"
showStandardStreams = true
exceptionFormat = "full"
}
outputs.upToDateWhen { false }
}
tasks.withType(Checkstyle) {
checkstyleClasspath = project.configurations.checkstyleConfig
checkstyleTest {
configFile file('config/checkstyle/checkstyle-test.xml')
}
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
required { gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
try {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
catch (Exception e) {
}
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
try {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
catch (Exception e) {
}
}
pom.project {
name 'jndn-mock'
packaging 'jar'
description 'Tools for testing NDN Java code without using network IO'
url 'https://github.com/01org/jndn-mock'
scm {
connection 'scm:git:https://github.com/01org/jndn-mock'
developerConnection 'scm:git:https://github.com/01org/jndn-mock'
url 'https://github.com/01org/jndn-mock'
}
licenses {
license {
name 'GNU Lesser General Public License, Version 3.0+'
url 'http://www.gnu.org/licenses/lgpl.html'
}
}
developers {
developer {
id 'andrewbrown'
name 'Andrew Brown'
url 'https://github.com/andrewsbrown'
}
developer {
id 'cawka'
name 'Alexander Afanasyev'
email 'aa@cs.ucla.edu'
}
}
}
}
}
}
cobertura {
coverageFormats = ['html', 'xml']
}