forked from conductor-oss/conductor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
159 lines (136 loc) · 4.97 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
import org.springframework.boot.gradle.plugin.SpringBootPlugin
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:3.3.5'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.+'
}
}
plugins {
id 'io.spring.dependency-management' version '1.1.3'
id 'java'
id 'application'
id 'maven-publish'
id 'signing'
id 'java-library'
id "com.diffplug.spotless" version "6.25.0"
id 'org.springframework.boot' version '3.3.5'
}
// Establish version and status
ext.githubProjectName = rootProject.name // Change if github project name is not the same as the root project's name
subprojects {
tasks.withType(Javadoc).all { enabled = false }
}
apply from: "$rootDir/dependencies.gradle"
apply from: "$rootDir/springboot-bom-overrides.gradle"
apply from: "$rootDir/deploy.gradle"
allprojects {
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java-library'
apply plugin: 'project-report'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
group = 'org.conductoross'
configurations {
all {
exclude group: 'ch.qos.logback', module: 'logback-classic'
exclude group: 'ch.qos.logback', module: 'logback-core'
exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j'
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
resolutionStrategy.eachDependency { details ->
if (details.requested.group.startsWith('com.fasterxml.jackson.') ) {
details.useVersion "2.15.2"
}
}
}
}
repositories {
mavenCentral()
}
dependencyManagement {
imports {
// dependency versions for the BOM can be found at https://docs.spring.io/spring-boot/docs/3.1.4/reference/htmlsingle/#appendix.dependency-versions
mavenBom(SpringBootPlugin.BOM_COORDINATES)
}
}
dependencies {
implementation('org.apache.logging.log4j:log4j-core')
implementation('org.apache.logging.log4j:log4j-api')
implementation('org.apache.logging.log4j:log4j-slf4j-impl')
implementation('org.apache.logging.log4j:log4j-jul')
implementation('org.apache.logging.log4j:log4j-web')
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
compileOnly 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
testImplementation('org.springframework.boot:spring-boot-starter-test')
testImplementation('org.springframework.boot:spring-boot-starter-log4j2')
testImplementation 'junit:junit'
testImplementation "org.junit.vintage:junit-vintage-engine"
testAnnotationProcessor 'org.projectlombok:lombok:1.18.34'
//Locks for the dependecies
implementation('org.codehaus.jettison:jettison') {
version {
strictly '1.5.4'
}
}
implementation('org.apache.tomcat.embed:tomcat-embed-core')
}
// processes additional configuration metadata json file as described here
// https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/html/appendix-configuration-metadata.html#configuration-metadata-additional-metadata
compileJava.inputs.files(processResources)
test {
useJUnitPlatform()
testLogging {
events = ["SKIPPED", "FAILED"]
exceptionFormat = "full"
displayGranularity = 1
showStandardStreams = false
}
}
bootJar {
enabled = false
}
}
// all client and their related modules are published with Java 17 compatibility
["annotations", "common", "client", "client-spring", "grpc", "grpc-client"].each {
project(":conductor-$it") {
compileJava {
options.release = 17
}
}
}
task server {
dependsOn ':conductor-server:bootRun'
}
configure(allprojects - project(':conductor-grpc')) {
apply plugin: 'com.diffplug.spotless'
spotless {
java {
googleJavaFormat().aosp()
removeUnusedImports()
importOrder('java', 'javax', 'org', 'com.netflix', '', '\\#com.netflix', '\\#')
licenseHeaderFile("$rootDir/licenseheader.txt")
}
}
}
['cassandra-persistence', 'core', 'redis-concurrency-limit', 'test-harness', 'client'].each {
configure(project(":conductor-$it")) {
spotless {
groovy {
importOrder('java', 'javax', 'org', 'com.netflix', '', '\\#com.netflix', '\\#')
licenseHeaderFile("$rootDir/licenseheader.txt")
}
}
}
}