-
Notifications
You must be signed in to change notification settings - Fork 54
/
build.gradle
171 lines (135 loc) · 4.4 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
buildscript {
repositories {
mavenCentral()
jcenter()
}
}
plugins {
id 'java-library'
id 'jacoco'
id 'checkstyle'
id 'pmd'
// required for: website.gradle
id 'org.ajoberstar.git-publish'
// deploy to maven central
id 'maven-publish'
id 'signing'
id "com.jfrog.bintray"
id "com.github.ben-manes.versions"
id "biz.aQute.bnd.builder"
}
javadoc {
include 'name/neuhalfen/projects/crypto/bouncycastle/openpgp/**'
options.addBooleanOption('html5', true)
}
checkstyle {
toolVersion = "8.24"
showViolations = false
sourceSets = [project.sourceSets.main]
// maxWarnings = 0
}
tasks.withType(Checkstyle).configureEach {
reports {
xml.setRequired(true)
// html.destination rootProject.file("build/reports/checkstyle.html")
// html.stylesheet resources.text.fromFile('config/xsl/checkstyle-custom.xsl')
}
}
jacoco {
toolVersion = "0.8.11"
getReportsDirectory().set(file("${buildDir}/jacocoHtml"))
}
jacocoTestReport {
reports {
xml.setRequired(true)
csv.setRequired(true)
html.setRequired(true)
html.destination file("${buildDir}/jacocoHtml")
}
}
pmd {
toolVersion = "6.20.0"
ruleSetFiles = files("config/pmd/ruleset.xml")
ruleSets =[]
sourceSets = [project.sourceSets.main]
ignoreFailures = false
}
// Global configuration
project.ext.set("cms_BuildRoot", "$buildDir/website_src")
project.ext.set("specifications_cms_cmsdRoot", "$projectDir/website")
project.ext.set("specifications_cms_target", "$buildDir/website")
project.ext.set("specifications_concordion_target", "$reporting.baseDir/specs/concordion")
project.ext.set("specifications_prepareForCms_source", "$specifications_concordion_target/specs")
project.ext.set("specifications_prepareForCms_target", "$cms_BuildRoot/content/HowTo")
// use ./gradlew -PHUGO_EXEC=/path/to/hugo to configure the executable for hugo
project.ext.set("hugo", project.hasProperty("HUGO_EXEC") ? HUGO_EXEC : "hugo")
// ----
sourceCompatibility = 8
targetCompatibility = 8
group = 'name.neuhalfen.projects.crypto.bouncycastle.openpgp'
version = '2.3.0'
repositories {
mavenCentral()
jcenter()
}
sourceSets {
integrationTest {
compileClasspath += sourceSets.main.output \
+ sourceSets.test.output
runtimeClasspath += output + compileClasspath
java.srcDir file('src/integration-test/java')
resources.srcDir file('src/integration-test/resources')
}
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
checkstyle {
// See https://github.com/gradle/gradle/issues/27035
resolutionStrategy.capabilitiesResolution.withCapability("com.google.collections:google-collections") {
select("com.google.guava:guava:0")
}
}
}
tasks.register('integrationTest', Test) {
description = 'Runs the integration tests.'
group = LifecycleBasePlugin.VERIFICATION_GROUP
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
mustRunAfter test
}
check.dependsOn integrationTest
dependencies {
implementation 'org.bouncycastle:bcprov-jdk15on:1.67'
implementation 'org.bouncycastle:bcpg-jdk15on:1.67'
implementation 'org.slf4j:slf4j-api:1.7.30'
// @Nullable and friends are not needed at runtime
implementation 'com.google.code.findbugs:jsr305:3.0.2'
testImplementation 'junit:junit:4.13'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'org.mockito:mockito-core:3.2.4'
testImplementation 'org.concordion:concordion-api-documentation-extension:0.0.4'
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
}
test {
// Concordion
// display test output on console? (for debugging)
testLogging.showStandardStreams = false
// write output to build/reports/spec
systemProperties['concordion.output.dir'] = "${specifications_concordion_target}"
// force tests to run even if code hasn't changed
outputs.upToDateWhen { false }
jacoco {
enabled = true
}
}
// bintray deployment
// configured in gradle.properties
if (hasProperty('bintray_Username')) {
apply from: 'bintray.gradle'
}
apply from: 'website.gradle'
wrapper {
gradleVersion = '7.6.2'
}