-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
143 lines (126 loc) · 3.88 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
buildscript {
ext {
springBootVersion = '2.1.4.RELEASE'
}
repositories {
mavenCentral()
maven { url 'http://repo.spring.io/plugins-release' }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1")
}
}
ext {
springBootVersion = '2.1.4.RELEASE'
}
apply plugin: 'java-library'
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'maven-publish'
apply plugin: 'signing'
version = '0.3.2'
group = 'eu.hinsch'
jar {
baseName = 'spring-boot-actuator-user-agent-metrics'
version = project.version
}
sourceCompatibility = 11
targetCompatibility = 11
repositories {
mavenCentral()
}
bootJar.enabled false
jar.enabled true
dependencies {
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.boot:spring-boot-starter-web")
compile("nl.basjes.parse.useragent:yauaa:5.12")
testCompile("org.springframework.boot:spring-boot-starter-test")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
testCompileOnly("org.projectlombok:lombok")
testAnnotationProcessor("org.projectlombok:lombok")
}
compileJava.dependsOn(processResources)
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
test {
testLogging {
events "failed"
exceptionFormat "full" // show assertion errors in build
}
}
wrapper {
gradleVersion = '5.6.1'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'spring-boot-actuator-user-agent-metrics'
from components.java
artifact sourcesJar
artifact javadocJar
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'spring-boot-actuator-user-agent-metrics'
description = 'Filter to log user agent statistics as spring boot actuator metrics'
url = 'https://github.com/lukashinsch/spring-boot-actuator-user-agent-metrics'
licenses {
license {
name = 'MIT License'
url = 'http://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id = 'lukashinsch'
name = 'Lukas Hinsch'
}
}
scm {
connection = 'scm:git:[email protected]:lukashinsch/spring-boot-actuator-user-agent-metrics.git'
url = 'https://github.com/lukashinsch/spring-boot-actuator-user-agent-metrics'
}
}
}
}
repositories {
maven {
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = project.hasProperty('sonatypeUser') ? sonatypeUser : ''
password = project.hasProperty('sonatypePassword') ? sonatypePassword : ''
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
options.addBooleanOption('html5', true)
}