This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
192 lines (155 loc) · 4.95 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 {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.22.0"
}
}
//=======================================
// apply build plugins
//=======================================
plugins {
id 'com.github.jk1.dependency-license-report' version '0.3.4'
id 'com.github.hierynomus.license' version '0.13.1'
id 'org.owasp.dependencycheck' version '5.3.0'
id 'io.codearte.nexus-staging' version '0.22.0'
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'io.codearte.nexus-staging'
apply plugin: 'com.github.hierynomus.license'
//=======================================
// build properties
//=======================================
group = "com.ibm.cusp"
archivesBaseName = "cusp"
version = "1.0.0"
//=======================================
// dependencies and dependency checks
//=======================================
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
dependencies {
implementation "org.jgrapht:jgrapht-core:1.3.0"
implementation "org.jgrapht:jgrapht-ext:1.3.0"
implementation "com.linkedin.parseq:parseq:3.0.0"
implementation 'net.jodah:typetools:0.6.1'
implementation 'com.google.guava:guava:27.0.1-jre'
testRuntime 'org.apache.logging.log4j:log4j-api:2.16.0'
testRuntime 'org.apache.logging.log4j:log4j-core:2.16.0'
testRuntime 'org.apache.logging.log4j:log4j-slf4j-impl:2.16.0'
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile "org.assertj:assertj-core:2.1.0"
testCompile 'org.mockito:mockito-core:1.10.19'
}
dependencyCheck {
format = 'ALL'
failOnError = false
}
//=======================================
// source code properties and checks
//=======================================
license {
ext.copyright_year = Calendar.getInstance().get(Calendar.YEAR)
header = rootProject.file('COPYRIGHT-HEADER')
exclude("*.properties")
exclude("*.json")
exclude("*.xml")
exclude("*.txt")
exclude("*.crt")
}
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
//=======================================
// testing configuration
//=======================================
test {
testLogging {
showStandardStreams = true
}
}
//=======================================
// packaging
//=======================================
jar {
manifest {
attributes(
'Built-By': System.getProperty('user.name'),
'Built-JDK': System.getProperty('java.version')
)
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
//=======================================
// publication
//=======================================
def ossrhUsername = System.getenv('SONATYPE_USERNAME')
def ossrhPassword = System.getenv('SONATYPE_PASSWORD')
uploadArchives {
repositories {
mavenDeployer {
// Sign POM
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
// Add required metadata to POM
pom.project {
name 'cusp'
description 'CUSP is a Java software framework for creating execution pipelines composed of modular stages that emphasizes traceability, visualization, and understandability.'
url 'https://github.com/IBM/cusp'
inceptionYear '2019'
packaging 'jar'
scm {
url 'https://github.com/IBM/cusp'
connection 'scm:https://github.com/IBM/cusp'
developerConnection 'scm:git://github.com/IBM/cusp'
}
licenses {
license {
name 'The MIT License'
url 'https://github.com/IBM/cusp/blob/main/LICENSE'
distribution 'repo'
}
}
developers {
developer {
id 'anastasds'
name 'Anastas Stoyanovsky'
}
developer {
id 'jaymindesai'
name 'Jaymin Desai'
}
}
}
}
}
}