| buildscript { |
| repositories { |
| mavenLocal() |
| 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.management' |
| group = 'net.named-data.jndn-extra' |
| version = '1.2.2' |
| |
| 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/" |
| } |
| } |
| |
| sourceSets { |
| test { |
| java { |
| exclude '**/*IT.java' |
| } |
| } |
| integrationTest { |
| java { |
| compileClasspath += main.output + test.output |
| runtimeClasspath += main.output + test.output |
| srcDir file('src/test/java') |
| include '**/*IT.java' |
| } |
| } |
| } |
| |
| configurations { |
| checkstyleConfig |
| integrationTestCompile.extendsFrom testCompile |
| integrationTestRuntime.extendsFrom testRuntime |
| } |
| |
| dependencies { |
| compile 'net.named-data:jndn:0.22' |
| |
| testCompile 'junit:junit:4.12' |
| testCompile 'net.named-data.jndn-extra:jndn-mock:1.1.1' |
| testRuntime 'org.slf4j:slf4j-api:1.7.26' |
| |
| checkstyleConfig "com.puppycrawl.tools:checkstyle:8.22" |
| } |
| |
| task javadocJar(type: Jar) { |
| classifier = 'javadoc' |
| from javadoc |
| } |
| |
| task sourcesJar(type: Jar) { |
| classifier = 'sources' |
| from sourceSets.main.allSource |
| } |
| |
| task integrationTest(type: Test) { |
| description 'Compile and run integration tests' |
| group = 'verification' |
| |
| testClassesDirs = sourceSets.integrationTest.output.classesDirs |
| classpath = sourceSets.integrationTest.runtimeClasspath |
| |
| mustRunAfter test |
| } |
| |
| 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 |
| checkstyleMain { |
| exclude 'com/intel/jndn/management/enums/NfdTlv.java' |
| } |
| checkstyleTest { |
| configFile file('config/checkstyle/checkstyle-test.xml') |
| } |
| checkstyleIntegrationTest { |
| 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-management' |
| packaging 'jar' |
| description 'Tools for managing an NDN forwarding daemon' |
| url 'https://github.com/01org/jndn-management' |
| |
| scm { |
| connection 'scm:git:https://github.com/cawka/jndn-management' |
| developerConnection 'scm:git:https://github.com/01org/jndn-management' |
| url 'https://github.com/01org/jndn-management' |
| } |
| |
| 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'] |
| } |