-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.gradle
180 lines (156 loc) · 5.83 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
buildscript {
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:3.1.5"
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.+'
}
}
plugins {
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
}
ext {
group = 'io.orkes.queue'
appVersion = '0.0.5-SNAPSHOT'
springBootVersion = '3.1.5'
versions = [
revConductor : '3.10.7',
revTestContainer : '1.17.2',
revGuava : '30.0-jre',
revLog4j : '2.17.1',
revJedis : '3.3.0',
revMockServerClient : '5.12.0',
revCommonsLang : '3.12.0',
revLombok : '1.18.24',
revLucene : '7.7.3',
revSpectator : '0.122.0',
revOpenapi : '1.6.+',
revAwsSdk : '1.12.153',
revProtoBuf : '3.13.0',
revRarefiedRedis : '0.0.17'
]
}
def relVersion = System.getenv('REL_VER')
if (relVersion) {
println "Inferred version from env variable 'REL_VER': $relVersion"
appVersion = relVersion
}
subprojects {
group = 'io.orkes.queues'
version = "${appVersion}"
apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'com.diffplug.spotless'
repositories {
mavenCentral()
}
java {
withSourcesJar()
withJavadocJar()
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
testCompileOnly {
extendsFrom annotationProcessor
}
all {
exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
}
dependencies {
implementation "org.apache.logging.log4j:log4j-core:${versions.revLog4j}!!"
implementation "org.apache.logging.log4j:log4j-api:${versions.revLog4j}!!"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:${versions.revLog4j}!!"
implementation "org.apache.logging.log4j:log4j-jul:${versions.revLog4j}!!"
implementation "org.apache.logging.log4j:log4j-web:${versions.revLog4j}!!"
implementation "org.apache.logging.log4j:log4j-to-slf4j:${versions.revLog4j}!!"
compileOnly "org.projectlombok:lombok:${versions.revLombok}"
annotationProcessor "org.projectlombok:lombok:${versions.revLombok}"
testAnnotationProcessor "org.projectlombok:lombok:${versions.revLombok}"
implementation "org.apache.commons:commons-lang3:${versions.revCommonsLang}"
}
dependencyManagement {
imports {
mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
}
}
test {
useJUnitPlatform()
testLogging {
events = ["SKIPPED", "FAILED"]
exceptionFormat = "full"
showStandardStreams = false
}
}
compileJava {
sourceCompatibility = 17
targetCompatibility = 17
}
spotless {
java {
googleJavaFormat().aosp()
removeUnusedImports()
importOrder('java', 'javax', 'org', 'com.netflix', 'io.orkes','', '\\#com.netflix', '\\#')
licenseHeaderFile("$rootDir/licenseheader.txt")
}
}
build.dependsOn(spotlessApply)
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'Orkes Queues'
description = 'High Performance Distributed Queues'
url = 'https://github.com/orkes-io/orkes-queues'
scm {
connection = 'scm:git://github.com/orkes-io/orkes-queues.git'
developerConnection = 'scm:git://github.com/orkes-io/orkes-queues.git'
url = 'https://github.com/orkes-io/orkes-queues'
}
licenses {
license {
name = 'Orkes Community License'
url = 'https://github.com/orkes-io/licenses/blob/main/community/LICENSE.txt'
}
}
developers {
developer {
organization = 'Orkes'
organizationUrl = 'https://orkes.io'
name = 'Orkes Development Team'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
if (project.hasProperty("mavenCentral")) {
println "Publishing to Sonatype Repository"
url = "https://s01.oss.sonatype.org/${project.version.endsWith('-SNAPSHOT') ? "content/repositories/snapshots/" : "service/local/staging/deploy/maven2/"}"
credentials {
username project.properties.username
password project.properties.password
}
}
}
}
def signingKeyId = findProperty('signingKeyId')
if(signingKeyId) {
println 'Signing the artifact with keys'
signing {
def signingKey = findProperty('signingKey')
def signingPassword = findProperty('signingPassword')
if (signingKeyId && signingKey && signingPassword) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
}
sign publishing.publications
}
}
}
}