forked from neuhalje/bouncy-gpg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
170 lines (133 loc) · 4.2 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:4.3.1'
}
}
plugins {
id 'java'
id 'jacoco'
id 'checkstyle'
id 'pmd'
// required for: website.gradle
id 'org.ajoberstar.git-publish' version '0.3.0'
// deploy to maven central
id 'maven'
id 'maven-publish'
id 'signing'
id "com.jfrog.bintray" version "1.8.4"
id "com.github.ben-manes.versions" version "0.27.0"
}
javadoc {
include 'name/neuhalfen/projects/crypto/bouncycastle/openpgp/**'
options.addBooleanOption('html5', true)
}
checkstyle {
toolVersion = "8.1"
showViolations = false
sourceSets = [project.sourceSets.main]
// maxWarnings = 0
}
tasks.withType(Checkstyle) {
reports {
xml.enabled true
// html.destination rootProject.file("build/reports/checkstyle.html")
// html.stylesheet resources.text.fromFile('config/xsl/checkstyle-custom.xsl')
}
}
jacoco {
toolVersion = "0.8.2"
reportsDir = file("${buildDir}/jacocoHtml")
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
html.enabled 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.2.0'
repositories {
jcenter()
}
sourceSets {
integrationTest {
compileClasspath += sourceSets.main.output \
+ sourceSets.test.output \
+ configurations.testRuntime
runtimeClasspath += output + compileClasspath
java.srcDir file('src/integration-test/java')
resources.srcDir file('src/integration-test/resources')
}
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
task integrationTest(type: 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 {
compile 'org.bouncycastle:bcprov-jdk15on:1.64'
compile 'org.bouncycastle:bcpg-jdk15on:1.64'
compile 'org.slf4j:slf4j-api:1.7.30'
compile 'ch.qos.logback:logback-classic:1.2.3'
// @Nullable and friends are not needed at runtime
compile 'com.google.code.findbugs:jsr305:3.0.2'
testCompile 'junit:junit:4.13'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'org.mockito:mockito-core:3.2.4'
testCompile 'org.concordion:concordion-api-documentation-extension:0.0.4'
}
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 = '6.1'
}
// Generate OSGI bundle metadata
apply plugin: 'biz.aQute.bnd.builder'