-
-
Notifications
You must be signed in to change notification settings - Fork 209
/
build.gradle
147 lines (131 loc) · 5.43 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
import java.text.SimpleDateFormat
plugins {
id 'com.github.ben-manes.versions' version '0.51.0'
id 'java-library'
id 'maven-publish'
id 'signing'
}
dependencies {
api platform(project(':platform'))
api platform('org.springframework.boot:spring-boot-dependencies:2.7.18')
annotationProcessor platform('org.springframework.boot:spring-boot-dependencies:2.7.18')
api project(':core')
api 'org.springframework.boot:spring-boot-starter'
annotationProcessor 'org.springframework.boot:spring-boot-autoconfigure-processor'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
compileOnly 'org.springframework.boot:spring-boot-starter-actuator'
compileOnly 'io.micrometer:micrometer-core'
compileOnly 'com.fasterxml.jackson.core:jackson-databind'
compileOnly 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
compileOnly 'com.google.code.gson:gson'
compileOnly 'org.eclipse:yasson'
compileOnly 'org.springframework.data:spring-data-redis'
compileOnly 'redis.clients:jedis'
compileOnly 'io.lettuce:lettuce-core'
compileOnly 'org.mongodb:mongodb-driver-sync'
compileOnly 'co.elastic.clients:elasticsearch-java'
testImplementation testFixtures(project(":core"))
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-starter-actuator'
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
testImplementation 'com.google.code.gson:gson'
testImplementation 'org.springframework.data:spring-data-redis'
testImplementation 'redis.clients:jedis'
testImplementation 'io.lettuce:lettuce-core'
testImplementation 'org.mongodb:mongodb-driver-sync'
testImplementation 'co.elastic.clients:elasticsearch-java'
testImplementation 'io.micrometer:micrometer-core'
}
tasks.named("dependencyUpdates").configure {
rejectVersionIf {
it.candidate.version.startsWith('3')
}
}
java {
withJavadocJar()
withSourcesJar()
}
normalization {
runtimeClasspath {
ignore '**/MANIFEST.MF'
ignore '**/frontend/**'
}
}
jar {
manifest {
attributes 'Automatic-Module-Name': 'org.jobrunr.spring.boot-2.starter'
attributes 'Built-By': 'build.jobrunr.io'
attributes 'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(new Date())
attributes 'Build-Version': project.version
attributes 'Implementation-Version': project.version
attributes 'Bundle-Version': project.version
attributes 'Created-By': "Gradle ${gradle.gradleVersion}"
attributes 'Build-Jdk': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})"
attributes 'Build-OS': "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}"
}
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'org.jobrunr'
artifactId = 'jobrunr-spring-boot-2-starter'
version = project.version
from components.java
pom {
name = 'JobRunr Spring Boot Starter'
description = 'An easy way to perform background processing on the JVM. Backed by persistent storage. Open and free for commercial use.'
url = 'https://github.com/jobrunr/jobrunr'
licenses {
license {
name = 'GNU Lesser General Public License v3.0 or later'
url = 'https://github.com/jobrunr/jobrunr/blob/master/License.md#lgpl-v3-license'
}
license {
name = 'Commercial License'
url = 'https://github.com/jobrunr/jobrunr/blob/master/License.md#commercial-license'
}
}
developers {
developer {
id = 'rdehuyss'
name = 'Ronald Dehuysser'
email = 'ronald.dehuysser@gmail.com'
}
}
scm {
connection = 'scm:git:https://github.com/jobrunr/jobrunr.git'
developerConnection = 'scm:git@github.com:jobrunr/jobrunr.git'
url = 'https://github.com/jobrunr/jobrunr.git'
}
versionMapping {
usage('java-runtime') {
fromResolutionResult()
}
}
withXml {
def pomNode = asNode()
pomNode.remove(pomNode.dependencyManagement)
pomNode.dependencies.'*'.each() {
if (it.optional.text() == 'true') {
it.parent().remove(it)
} else if (it.artifactId.text() == 'spring-boot-starter') {
it.scope.replaceNode {
scope('provided')
}
}
}
}
}
}
}
}
signing {
String base64Key = System.getenv('SIGNING_KEY')
if (base64Key) {
useInMemoryPgpKeys(new String(Base64.decoder.decode(base64Key)), System.getenv('SIGNING_PASSWORD'))
sign publishing.publications.mavenJava
}
}
sonar {
skipProject = true
}