| buildscript { |
| repositories { |
| mavenLocal() |
| jcenter() |
| mavenCentral() |
| } |
| } |
| |
| plugins { |
| id 'java' |
| id 'maven' |
| id 'signing' |
| //id 'checkstyle' |
| id 'org.sonarqube' version '2.8' |
| id 'net.saliman.cobertura' version '3.0.0' |
| } |
| |
| group = 'net.named-data.jndn-extra' |
| version = '1.1.1' |
| |
| sourceCompatibility = JavaVersion.VERSION_1_8 |
| targetCompatibility = JavaVersion.VERSION_1_8 |
| compileJava.options.encoding = 'UTF-8' |
| |
| repositories { |
| mavenLocal() |
| jcenter() |
| mavenCentral() |
| maven { |
| url "https://oss.sonatype.org/content/repositories/releases/" |
| } |
| } |
| |
| configurations { |
| checkstyleConfig |
| } |
| |
| dependencies { |
| compile 'net.named-data:jndn:0.24' |
| |
| testCompile 'junit:junit:4.12' |
| testRuntime 'org.slf4j:slf4j-api:1.7.30' |
| |
| checkstyleConfig 'com.puppycrawl.tools:checkstyle:8.23' |
| } |
| |
| 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/named-data/jndn-mock' |
| |
| scm { |
| connection 'scm:git:https://github.com/named-data/jndn-mock.git' |
| developerConnection 'scm:git:ssh://git@github.com/named-data/jndn-mock.git' |
| url 'https://github.com/named-data/jndn-mock' |
| } |
| |
| licenses { |
| license { |
| name 'GNU Lesser General Public License, Version 3.0+' |
| url 'https://www.gnu.org/licenses/lgpl-3.0.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'] |
| } |