This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
192 lines (165 loc) · 4.23 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
buildscript {
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
}
plugins {
id 'org.sonarqube' version '1.2'
id 'net.saliman.cobertura' version '2.3.0'
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'maven-publish'
apply plugin: 'checkstyle'
group = 'com.intel.jndn.management'
version = '1.1.3'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
compileJava.options.encoding = 'UTF-8'
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
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.13'
testCompile 'junit:junit:4.12'
testCompile 'com.intel.jndn.mock:jndn-mock:1.0.3'
testRuntime 'org.slf4j:slf4j-api:1.7.16'
checkstyleConfig "com.puppycrawl.tools:checkstyle:6.15"
}
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'
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
}
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
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact javadocJar
artifact 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 '[email protected]'
}
}
}
}
}
}
cobertura {
coverageFormats = ['html', 'xml']
}