-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
160 lines (140 loc) · 4.07 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
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 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"
]
project.ext.set("baseJvmArgs", baseJvmArgs)
allprojects {
apply plugin: "java-library"
apply plugin: "jacoco"
apply plugin: 'maven-publish'
apply plugin: 'signing'
group = "com.obsidiandynamics.yconf"
version = "0.24.0-SNAPSHOT"
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 {
fulcrumVersion = "0.39.0"
gsonVersion = "2.8.5"
juelVersion = "2.2.7"
junitVersion = "4.12"
mockitoVersion = "3.0.0"
snakeyamlVersion = "1.25"
}
dependencies {
testImplementation "com.obsidiandynamics.fulcrum:fulcrum-assert:${fulcrumVersion}"
testImplementation "junit:junit:${junitVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
}
test {
exclude "**/*IT.class"
jvmArgs += baseJvmArgs
}
jacoco {
toolVersion = "0.8.8"
}
jacocoTestReport {
additionalSourceDirs.from = files(sourceSets.main.allSource.srcDirs)
sourceDirectories.from = files(sourceSets.main.allSource.srcDirs)
classDirectories.from = files(sourceSets.main.output)
reports {
html.required = true
xml.required = true
csv.required = false
}
}
}
subprojects {}
task jacocoRootReport(type: JacocoReport) {
mustRunAfter = allprojects.test + allprojects.javadoc
additionalSourceDirs.from = files(allprojects.sourceSets.main.allSource.srcDirs)
sourceDirectories.from = files(allprojects.sourceSets.main.allSource.srcDirs)
classDirectories.from = files(allprojects.sourceSets.main.output)
executionData.setFrom project.fileTree(dir: '.', include: ['**/build/jacoco/test.exec'])
reports {
html.required = true
xml.required = true
csv.required = false
}
onlyIf = {
true
}
afterEvaluate {
classDirectories.from = files(classDirectories.files.collect {
fileTree(dir: it, exclude: ["sample/**", "**/*Uncovered*"])
})
}
}
def packageName = "yconf-core"
def packageDescription = "Simple, elegant configuration"
dependencies {
}
jar {
finalizedBy jacocoRootReport
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = packageName
from components.java
pom {
name = packageName
description = packageDescription
url = 'https://github.com/obsidiandynamics/yconf'
licenses {
license {
name = 'BSD 3-Clause License'
url = 'https://opensource.org/licenses/BSD-3-Clause'
}
}
developers {
developer {
id = 'ekoutanov'
name = 'Emil Koutanov'
email = 'ekoutanov@gmail.com'
}
}
scm {
connection = 'scm:git:git://github.com/obsidiandynamics/yconf.git'
developerConnection = 'scm:git:ssh://github.com/obsidiandynamics/yconf.git'
url = 'https://github.com/obsidiandynamics/yconf'
}
}
}
}
}