forked from openMF/ph-ee-connector-channel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
216 lines (198 loc) · 7.82 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
/*
* 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/**','**/gsmastub/**', '**/bin/**', '**/.settings/**', '**/.idea/**', '**/.gradle/**', '**/gradlew.bat', '**/licenses/**', '**/banner.txt', '.vscode/**'
indentWithSpaces(4)
endWithNewline()
trimTrailingWhitespace()
}
groovyGradle {
target '*.gradle', '**/*.gradle'
targetExclude '**/build/**', '**/gsmastub/**'
greclipse()
indentWithSpaces(4)
endWithNewline()
trimTrailingWhitespace()
}
lineEndings 'UNIX'
}
ext {
springBootVersion = '2.6.2'
}
dependencies {
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'org.mifos:ph-ee-connector-common:1.4.1-SNAPSHOT'
implementation 'org.apache.camel.springboot:camel-spring-boot-starter:3.12.0'
implementation('org.springframework.boot:spring-boot-starter-web:2.6.2')
implementation "org.springframework.boot:spring-boot-starter-actuator:$springBootVersion"
implementation 'org.apache.camel:camel-endpointdsl:3.12.0'
implementation 'org.apache.camel:camel-jetty:3.12.0'
implementation 'org.apache.camel:camel-http:3.12.0'
implementation 'org.springframework:spring-web:5.3.15'
implementation 'org.apache.camel:camel-bean-validator:3.12.0'
implementation 'org.apache.camel:camel-undertow:3.12.0'
implementation 'org.apache.camel.springboot:camel-jackson-starter:3.12.0'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.1'
implementation 'org.json:json:20211205'
implementation 'io.camunda:zeebe-client-java:8.1.1'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.6.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.6.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
implementation 'javax.servlet:javax.servlet-api:3.1.0'
implementation 'commons-codec:commons-codec:1.15'
implementation 'commons-io:commons-io:2.11.0'
implementation ("org.apache.camel:camel-spring-redis:3.12.0")
implementation "org.springframework.boot:spring-boot-starter-data-redis:2.6.2"
implementation 'io.springfox:springfox-swagger-ui:3.0.0'
implementation 'io.springfox:springfox-oas:3.0.0'
implementation 'com.github.joschi.jackson:jackson-datatype-threetenbp:2.6.4'
implementation "org.springdoc:springdoc-openapi-ui:1.6.11"
implementation 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
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'
implementation 'com.diffplug.spotless:spotless-plugin-gradle:6.17.0'
}
configure(this) {
// NOTE: order matters!
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'checkstyle'
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/**', '**/gsmastub/**'
importOrder() //sort imports alphabetically
removeUnusedImports()
eclipse().configFile "$rootDir/config/channel-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'
}
}
checkstyle {
checkstyleMain.exclude '**/gsmastub/**'
}
group = 'org.mifos'
version = '1.0.0-SNAPSHOT'
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
test {
useJUnitPlatform()
}
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}