| plugins { |
| id 'java-library' |
| id 'maven' // TODO: migrate to 'maven-publish' |
| id 'signing' |
| id 'checkstyle' |
| id 'org.sonarqube' version '3.0' |
| id 'net.saliman.cobertura' version '4.0.0' |
| } |
| |
| group = 'net.named-data.jndn-extra' |
| version = '1.3.0' |
| |
| 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 'src/test/java' |
| include '**/*IT.java' |
| } |
| } |
| } |
| |
| configurations { |
| integrationTestImplementation.extendsFrom testImplementation |
| integrationTestRuntimeOnly.extendsFrom testRuntimeOnly |
| } |
| |
| dependencies { |
| api 'net.named-data:jndn:0.24' |
| |
| testImplementation 'junit:junit:4.13.1' |
| testImplementation 'net.named-data.jndn-extra:jndn-mock:1.2.0' |
| testRuntimeOnly 'org.slf4j:slf4j-api:1.7.30' |
| } |
| |
| java { |
| sourceCompatibility = JavaVersion.VERSION_1_8 |
| targetCompatibility = JavaVersion.VERSION_1_8 |
| withJavadocJar() |
| withSourcesJar() |
| } |
| |
| tasks.withType(JavaCompile) { |
| options.deprecation = true |
| options.encoding = 'UTF-8' |
| } |
| |
| tasks.withType(Javadoc) { |
| options.addBooleanOption('Xdoclint:none', true) |
| } |
| |
| task integrationTest(type: Test) { |
| description 'Runs integration tests.' |
| group = 'verification' |
| |
| testClassesDirs = sourceSets.integrationTest.output.classesDirs |
| classpath = sourceSets.integrationTest.runtimeClasspath |
| |
| shouldRunAfter test |
| } |
| |
| tasks.withType(Test) { |
| outputs.upToDateWhen { false } |
| testLogging { |
| events "passed", "failed", "skipped" |
| exceptionFormat "full" |
| } |
| } |
| |
| checkstyle { |
| toolVersion '8.23' |
| } |
| 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') |
| } |
| |
| cobertura { |
| coverageFormats = ['html', 'xml'] |
| } |
| |
| 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/named-data/jndn-management' |
| |
| scm { |
| connection 'scm:git:https://github.com/named-data/jndn-management.git' |
| developerConnection 'scm:git:ssh://git@github.com/named-data/jndn-management.git' |
| url 'https://github.com/named-data/jndn-management' |
| } |
| |
| 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' |
| } |
| } |
| } |
| } |
| } |
| } |