-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
193 lines (167 loc) · 5.08 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
193
plugins {
id "com.github.ben-manes.versions" version "0.22.0"
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = findProperty('sonatype.username')
password = findProperty('sonatype.password')
}
}
}
def versionFile(extension) {
return new File("src/main/resources/" + project.name + extension)
}
def getVersion(extension) {
def versionFile = versionFile extension
if (! versionFile.exists()) return "0"
def reader = new BufferedReader(new FileReader(versionFile))
def version = reader.readLine().trim()
reader.close()
return version
}
def setVersion(extension, version) {
def versionFile = versionFile extension
def writer = new BufferedWriter(new FileWriter(versionFile))
writer.write(String.valueOf(version))
writer.close()
}
def packageVersion = getVersion ".version"
task getBuild() {
doLast {
println "At ${getVersion(".version")}_${getVersion(".build")}"
}
}
task setBuild() {
doLast {
def timestamp = new java.text.SimpleDateFormat("yyMMddHHmm").format(new Date())
setVersion(".build", timestamp)
}
}
def baseJvmArgs = [
"--add-opens=java.base/java.io=ALL-UNNAMED",
"--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.lang.invoke=ALL-UNNAMED",
"--add-opens=java.base/java.lang.reflect=ALL-UNNAMED",
"--add-opens=java.base/java.nio=ALL-UNNAMED",
"--add-opens=java.base/java.util=ALL-UNNAMED",
"--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED",
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED",
"-XX:-MaxFDLimit",
"-XX:+TieredCompilation",
"-XX:+UseNUMA",
"-XX:+UseCondCardMark",
"-Djava.net.preferIPv4Stack=true"
]
project.ext.set("baseJvmArgs", baseJvmArgs)
allprojects {
apply plugin: "java-library"
apply plugin: "jacoco"
apply plugin: 'maven-publish'
apply plugin: 'signing'
group = "com.obsidiandynamics.indigo"
version = packageVersion
sourceCompatibility = 1.8
targetCompatibility = 1.8
//TODO remove when Javadoc errors have been resolved
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
java {
withJavadocJar()
withSourcesJar()
}
signing {
sign publishing.publications
}
ext {
awaitilityVersion = "3.1.6"
commonsMathsVersion = "3.6.1"
equalsverifierVersion = "3.10"
fulcrumVersion = "0.39.0"
gsonVersion = "2.8.5"
gsonExtrasVersion = "0.2.1"
junitVersion = "4.12"
pojotesterVersion = "0.9.0"
slf4jVersion = "1.7.25"
}
test {
include "**/*Test.class"
jvmArgs += baseJvmArgs
testLogging {
info.events = ["started", "failed", "skipped", "passed"]
}
}
}
jacoco {
toolVersion = "0.8.8"
}
jacocoTestReport {
dependsOn test
reports {
html.required = true
xml.required = true
csv.required = false
}
}
def packageName = "indigo-core"
def packageDescription = "A dynamic actor framework for the JVM"
dependencies {
api project(":indigo-commons")
api "com.obsidiandynamics.fulcrum:fulcrum-assert:${fulcrumVersion}"
api "com.obsidiandynamics.fulcrum:fulcrum-func:${fulcrumVersion}"
api "com.obsidiandynamics.fulcrum:fulcrum-version:${fulcrumVersion}"
testImplementation project(":indigo-assurance")
testImplementation "com.obsidiandynamics.fulcrum:fulcrum-await:${fulcrumVersion}"
testImplementation "com.obsidiandynamics.fulcrum:fulcrum-junit:${fulcrumVersion}"
testImplementation "com.obsidiandynamics.fulcrum:fulcrum-threads:${fulcrumVersion}"
testImplementation "com.obsidiandynamics.fulcrum:fulcrum-verifier:${fulcrumVersion}"
testImplementation "org.awaitility:awaitility:${awaitilityVersion}"
testImplementation "nl.jqno.equalsverifier:equalsverifier:${equalsverifierVersion}"
testImplementation "com.obsidiandynamics.pojotester:core:${pojotesterVersion}"
}
jar {
finalizedBy jacocoTestReport
}
test {
include "com/obsidiandynamics/indigo/CycledPrimaryTests.class"
include "com/obsidiandynamics/indigo/SupportingTests.class"
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = packageName
from components.java
pom {
name = packageName
description = packageDescription
url = 'https://github.com/obsidiandynamics/indigo'
licenses {
license {
name = 'BSD 3-Clause License'
url = 'https://opensource.org/licenses/BSD-3-Clause'
}
}
developers {
developer {
id = 'ekoutanov'
name = 'Emil Koutanov'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/obsidiandynamics/indigo.git'
developerConnection = 'scm:git:ssh://github.com/obsidiandynamics/indigo.git'
url = 'https://github.com/obsidiandynamics/indigo'
}
}
}
}
}