forked from Yubico/java-webauthn-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
182 lines (148 loc) · 3.92 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.cinnober.gradle:semver-git:2.4.0'
}
}
plugins {
id 'com.github.kt3k.coveralls' version '2.8.1'
id 'io.codearte.nexus-staging' version '0.9.0'
id "io.freefair.lombok" version "3.6.6"
}
project.ext.isCiBuild = System.env.CI == 'true'
project.ext.publishEnabled = !isCiBuild &&
project.hasProperty('yubicoPublish') && project.yubicoPublish &&
project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')
if (publishEnabled) {
nexusStaging {
username = ossrhUsername
password = ossrhPassword
stagingProfileId = '6c61426e6529d'
}
}
wrapper {
gradleVersion = '5.4'
}
allprojects {
apply plugin: 'com.cinnober.gradle.semver-git'
apply plugin: 'idea'
group = 'com.yubico'
ext.snapshotSuffix = "<count>.g<sha>-SNAPSHOT<dirty>"
ext.dirtyMarker = "-DIRTY"
idea.module {
downloadJavadoc = true
downloadSources = true
}
}
subprojects {
repositories {
mavenLocal()
maven { url "http://repo.maven.apache.org/maven2" }
}
}
evaluationDependsOnChildren()
task assembleJavadoc(type: Sync) {
from("docs/index.html") {
expand project.properties
}
destinationDir = file("${rootProject.buildDir}/javadoc")
}
subprojects { project ->
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(AbstractArchiveTask) {
from(rootProject.file('COPYING'))
preserveFileTimestamps = false
reproducibleFileOrder = true
}
test {
failFast = true
testLogging {
showStandardStreams = isCiBuild
}
}
if (project.hasProperty('publishMe') && project.publishMe) {
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
javadoc {
options.encoding = 'UTF-8'
options.addStringOption('charset', 'UTF-8')
}
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc
}
rootProject.tasks.assembleJavadoc {
dependsOn javadoc
inputs.dir javadoc.destinationDir
from(javadoc.destinationDir) {
into project.name
}
}
}
if (publishEnabled && project.hasProperty('publishMe') && project.publishMe) {
apply plugin: 'maven-publish'
apply plugin: 'signing'
publishing {
publications {
jars(MavenPublication) {
from components.java
artifact javadocJar
artifact sourcesJar
pom {
name = project.name
description = project.description
url = 'https://developers.yubico.com/java-webauthn-server/'
developers {
developer {
id = 'emil'
name = 'Emil Lundberg'
email = '[email protected]'
}
}
licenses {
license {
name = 'BSD-license'
comments = 'Revised 2-clause BSD license'
}
}
scm {
url = 'scm:git:git://github.com/Yubico/java-webauthn-server.git'
connection = 'scm:git:git://github.com/Yubico/java-webauthn-server.git'
developerConnection = 'scm:git:ssh://[email protected]/Yubico/java-webauthn-server.git'
tag = 'HEAD'
}
}
}
}
repositories {
maven {
name = "sonatypeNexus"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.jars
}
}
}
task pitestMerge(type: com.yubico.gradle.pitest.tasks.PitestMergeTask)
coveralls {
sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten()
}
tasks.coveralls {
inputs.files pitestMerge.outputs.files
}