blob: f17f9be7416459185e521f83112f6e0255d05309 [file] [log] [blame]
Alexander Afanasyev8e9330f2016-01-25 19:13:40 -08001buildscript {
2 repositories {
3 jcenter()
4 mavenCentral()
5 }
6}
7
Alexander Afanasyev71904a12016-02-17 14:50:13 -08008plugins {
9 id "org.sonarqube" version "1.2"
10 id 'net.saliman.cobertura' version '2.3.0'
11}
12
Alexander Afanasyev8e9330f2016-01-25 19:13:40 -080013apply plugin: 'java'
14apply plugin: 'maven'
15apply plugin: 'signing'
16
17group = 'com.intel.jndn.mock'
andrewsbrownb1935c92016-02-16 19:01:03 -080018version = '1.0.1'
Alexander Afanasyev8e9330f2016-01-25 19:13:40 -080019
20sourceCompatibility = JavaVersion.VERSION_1_7
21targetCompatibility = JavaVersion.VERSION_1_7
22compileJava.options.encoding = 'UTF-8'
23
24repositories {
25 jcenter()
26 mavenLocal()
27 mavenCentral()
28}
29
30dependencies {
andrewsbrown6d700282016-02-16 18:29:46 -080031 compile 'net.named-data:jndn:0.10'
Alexander Afanasyev8e9330f2016-01-25 19:13:40 -080032 testCompile 'junit:junit:4.12'
Alexander Afanasyev71904a12016-02-17 14:50:13 -080033 testRuntime 'org.slf4j:slf4j-api:1.7.16'
Alexander Afanasyev8e9330f2016-01-25 19:13:40 -080034}
35
36task javadocJar(type: Jar) {
37 classifier = 'javadoc'
38 from javadoc
39}
40
41task sourcesJar(type: Jar) {
42 classifier = 'sources'
43 from sourceSets.main.allSource
44}
45
46tasks.withType(Test) {
47 reports.html.destination = file("${reporting.baseDir}/${name}")
48 testLogging {
49 events "passed", "skipped", "failed"
50 showStandardStreams = true
51 exceptionFormat = "full"
52 }
53 outputs.upToDateWhen { false }
54}
55
56if (JavaVersion.current().isJava8Compatible()) {
57 allprojects {
58 tasks.withType(Javadoc) {
59 options.addStringOption('Xdoclint:none', '-quiet')
60 }
61 }
62}
63
64artifacts {
65 archives javadocJar, sourcesJar
66}
67
68signing {
69 required { gradle.taskGraph.hasTask("uploadArchives") }
70 sign configurations.archives
71}
72
73uploadArchives {
74 repositories {
75 mavenDeployer {
76 beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
77
78 repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
79 try {
80 authentication(userName: ossrhUsername, password: ossrhPassword)
81 }
82 catch (Exception e) {
83 }
84 }
85
86 snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
87 try {
88 authentication(userName: ossrhUsername, password: ossrhPassword)
89 }
90 catch (Exception e) {
91 }
92 }
93
94 pom.project {
95 name 'jndn-mock'
96 packaging 'jar'
97 description 'Tools for testing NDN Java code without using network IO'
98 url 'https://github.com/01org/jndn-mock'
99
100 scm {
101 connection 'scm:git:https://github.com/01org/jndn-mock'
102 developerConnection 'scm:git:https://github.com/01org/jndn-mock'
103 url 'https://github.com/01org/jndn-mock'
104 }
105
106 licenses {
107 license {
108 name 'GNU Lesser General Public License, Version 3.0+'
109 url 'http://www.gnu.org/licenses/lgpl.html'
110 }
111 }
112
113 developers {
114 developer {
115 id 'andrewbrown'
116 name 'Andrew Brown'
117 url 'https://github.com/andrewsbrown'
118 }
119 developer {
120 id 'cawka'
121 name 'Alexander Afanasyev'
122 email 'aa@cs.ucla.edu'
123 }
124 }
125 }
126 }
127 }
128}
Alexander Afanasyev71904a12016-02-17 14:50:13 -0800129
130cobertura {
131 coverageFormats = ['html', 'xml']
132}