forked from intel/jndn-management
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
166 lines (142 loc) · 3.71 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
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://[email protected]/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 '[email protected]'
}
}
}
}
}
}