forked from openMF/ph-ee-bulk-processor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
258 lines (231 loc) · 9.04 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
id 'java'
id 'maven-publish'
id 'eclipse'
id 'checkstyle'
id 'org.springframework.boot' version '2.6.2'
id 'com.diffplug.spotless' version '6.19.0'
}
repositories {
// mavenLocal()
maven {
url = uri('https://repo.maven.apache.org/maven2')
}
maven {
url = uri('https://jfrog.sandbox.fynarfin.io/artifactory/fyn-libs-snapshot')
}
}
apply plugin:'com.diffplug.spotless'
spotless {
format 'misc', {
target '**/*.md', '**/*.properties', '**/.gitignore', '**/.openapi-generator-ignore', '**/*.yml', '**/*.xml', '**/**.json', '**/*.sql'
targetExclude '**/build/**', '**/bin/**', '**/.settings/**', '**/.idea/**', '**/.gradle/**', '**/gradlew.bat', '**/licenses/**', '**/banner.txt', '.vscode/**'
indentWithSpaces(4)
endWithNewline()
trimTrailingWhitespace()
}
groovyGradle {
target '*.gradle', '**/*.gradle'
targetExclude '**/build/**'
greclipse()
indentWithSpaces(4)
endWithNewline()
trimTrailingWhitespace()
}
lineEndings 'UNIX'
}
ext {
camelVersion = '3.4.0'
springBootVersion = '2.6.2'
cucumberVersion = '7.8.1'
lambokVersion = '1.18.24'
}
dependencies {
// spring dependency
implementation "org.springframework.boot:spring-boot-starter:$springBootVersion"
implementation "org.springframework.boot:spring-boot-starter-web:$springBootVersion"
implementation "org.springframework:spring-web:5.3.14"
implementation 'org.springframework.kafka:spring-kafka:2.8.1'
implementation "org.springframework.boot:spring-boot-starter-actuator:$springBootVersion"
// spring test dependency
testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
// camel dependency
implementation "org.apache.camel.springboot:camel-spring-boot-starter:$camelVersion"
implementation "org.apache.camel:camel-undertow:$camelVersion"
implementation "org.apache.camel:camel-http:$camelVersion"
implementation "org.apache.camel.springboot:camel-mail-starter:$camelVersion"
implementation "org.apache.camel:camel-jackson:$camelVersion"
// camel test dependency
testImplementation "org.apache.camel:camel-test:$camelVersion"
testImplementation "org.apache.camel:camel-test-spring-junit5:$camelVersion"
// cucumber test dependency
testImplementation "io.cucumber:cucumber-junit:$cucumberVersion"
testImplementation "io.cucumber:cucumber-spring:$cucumberVersion"
testImplementation "io.cucumber:cucumber-java:$cucumberVersion"
// miscellaneous dependency
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'org.json:json:20210307'
implementation 'org.mifos:ph-ee-connector-common:1.7.0-SNAPSHOT'
implementation 'org.apache.camel.springboot:camel-spring-boot-starter:3.4.0'
implementation 'org.apache.camel:camel-undertow:3.4.0'
implementation 'org.springframework.boot:spring-boot-starter:2.5.2'
implementation 'org.springframework.boot:spring-boot-starter-web:2.5.2'
implementation 'org.apache.camel:camel-http:3.4.0'
implementation 'org.springframework:spring-web:5.3.19'
implementation 'com.amazonaws:aws-java-sdk:1.11.486'
implementation 'commons-io:commons-io:2.11.0'
implementation 'com.amazonaws:aws-java-sdk-s3:1.11.486'
//To be removed
implementation 'com.amazonaws:aws-java-sdk-dynamodb:1.11.486'
implementation 'com.azure:azure-storage-blob:12.12.0'
implementation 'io.camunda:zeebe-client-java:8.1.1'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.12.3'
implementation 'org.apache.tika:tika-core:1.4'
implementation 'org.apache.commons:commons-io:1.3.2'
implementation "org.projectlombok:lombok:$lambokVersion"
annotationProcessor "org.projectlombok:lombok:$lambokVersion"
checkstyle 'com.puppycrawl.tools:checkstyle:10.9.3'
checkstyle 'com.github.sevntu-checkstyle:sevntu-checks:1.44.1'
implementation 'com.diffplug.gradle.spotless:spotless:2.4.1'
// miscellaneous test dependency
testImplementation "com.google.truth:truth:1.1.3"
testImplementation 'com.google.code.gson:gson:2.9.0'
}
configure(this) {
// NOTE: order matters!
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'checkstyle'
apply plugin: 'com.diffplug.spotless'
configurations {
implementation.setCanBeResolved(true)
api.setCanBeResolved(true)
}
tasks.withType(JavaCompile) {
options.compilerArgs += [
"-Xlint:unchecked",
"-Xlint:cast",
"-Xlint:auxiliaryclass",
"-Xlint:deprecation",
"-Xlint:dep-ann",
"-Xlint:divzero",
"-Xlint:empty",
"-Xlint:exports",
"-Xlint:fallthrough",
"-Xlint:finally",
"-Xlint:module",
"-Xlint:opens",
"-Xlint:options",
"-Xlint:overloads",
"-Xlint:overrides",
"-Xlint:path",
"-Xlint:processing",
"-Xlint:removal",
"-Xlint:requires-automatic",
"-Xlint:requires-transitive-automatic",
"-Xlint:try",
"-Xlint:varargs",
"-Xlint:preview",
"-Xlint:static",
// -Werror needs to be disabled because EclipseLink's static weaving doesn't generate warning-free code
// and during an IntelliJ recompilation, it fails
//"-Werror",
"-Xmaxwarns",
1500,
"-Xmaxerrs",
1500
]
options.deprecation = true
}
// Configuration for the spotless plugin
// https://github.com/diffplug/spotless/tree/main/plugin-gradle
spotless {
java {
targetExclude '**/build/**', '**/bin/**', '**/out/**'
importOrder() //sort imports alphabetically
removeUnusedImports()
eclipse().configFile "$rootDir/config/bulk-formatter.xml"
endWithNewline()
trimTrailingWhitespace()
// Enforce style modifier order
custom 'Modifier ordering', {
def modifierRanking = [
public : 1,
protected : 2,
private : 3,
abstract : 4,
default : 5,
static : 6,
final : 7,
transient : 8,
volatile : 9,
synchronized: 10,
native : 11,
strictfp : 12]
// Find any instance of multiple modifiers. Lead with a non-word character to avoid
// accidental matching against for instance, "an alternative default value"
it.replaceAll(/\W(?:public |protected |private |abstract |default |static |final |transient |volatile |synchronized |native |strictfp ){2,}/, {
// Do not replace the leading non-word character. Identify the modifiers
it.replaceAll(/(?:public |protected |private |abstract |default |static |final |transient |volatile |synchronized |native |strictfp ){2,}/, {
// Sort the modifiers according to the ranking above
it.split().sort({ modifierRanking[it] }).join(' ') + ' '
}
)
}
)
}
}
lineEndings 'UNIX'
}
// If we are running Gradle within Eclipse to enhance classes,
// set the classes directory to point to Eclipse's default build directory
if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') {
sourceSets.main.java.outputDir = file("$projectDir/bin/main")
}
// Configuration for the Checkstyle plugin
// https://docs.gradle.org/current/userguide/checkstyle_plugin.html
dependencies {
checkstyle 'com.puppycrawl.tools:checkstyle:10.3.1'
checkstyle 'com.github.sevntu-checkstyle:sevntu-checks:1.42.0'
}
}
group = 'org.mifos'
version = '0.0.1-SNAPSHOT'
description = 'ph-ee-processor-bulk'
sourceCompatibility = '17'
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// tasks.named('test') {
// useJUnitPlatform()
// }
// configurations {
// cucumberRuntime {
// extendsFrom testImplementation
// }
// }
// task cucumberCli() {
// dependsOn assemble, testClasses
// doLast {
// javaexec {
// main = "io.cucumber.core.cli.Main"
// classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
// args = [
// '--plugin', 'pretty',
// '--plugin', 'html:target/cucumber-report.html',
// '--glue', 'org.mifos.processor.cucumber',
// 'src/test/java/resources']
// }
// }
// }