blob: fda54cca6381779083cbbdca2aaedd5e51771990 [file] [log] [blame]
/*
* jndn-mock
* Copyright (c) 2016, Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
* version 3, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
* more details.
*/
buildscript {
repositories {
jcenter()
mavenCentral()
}
}
plugins {
id "org.sonarqube" version "2.6.2"
id 'net.saliman.cobertura' version '2.5.4'
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
//apply plugin: 'checkstyle'
// group = 'com.intel.jndn.mock'
group = 'net.named-data.jndn-extra'
version = '1.1.1'
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.17'
testCompile 'junit:junit:4.12'
testRuntime 'org.slf4j:slf4j-api:1.7.25'
checkstyleConfig "com.puppycrawl.tools:checkstyle:8.11"
}
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']
}