-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
188 lines (166 loc) · 6.78 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
/*
* Copyright 2020 Lighthouse Software, Inc. http://www.LighthouseSoftware.com
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'org.springframework.boot' version '2.3.1.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'org.asciidoctor.convert' version '1.5.8'
// TODO Cobertura 3.0.1 plugin unavailable in maven repos as of 7/7/2020 added pluginManagement
// settings to settings.gradle to get from another repo. remove when available in gradlePluginCentral
id 'net.saliman.cobertura' version '3.0.1-SNAPSHOT'
id "com.github.node-gradle.node" version "2.2.4"
id 'war'
id 'groovy'
id 'eclipse'
id 'idea'
id 'codenarc'
}
// TODO 2020 Update - current code lives an a voyage package,
// should be moved to com.lighthousesoftware.voyage
//group = 'com.lighthousesoftware'
//version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
ext {
set('snippetsDir', file("build/generated-snippets"))
set('springCloudVersion', "Hoxton.SR6")
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
implementation 'org.springframework.boot:spring-boot-starter-freemarker'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.security:spring-security-jwt:1.0.7.RELEASE'
implementation 'org.springframework.security.oauth:spring-security-oauth2:2.0.12.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-web-services'
implementation 'org.codehaus.groovy:groovy'
implementation 'org.codehaus.groovy:groovy-all:3.0.4'
implementation 'org.liquibase:liquibase-core'
implementation 'org.springframework.cloud:spring-cloud-starter-aws'
implementation 'org.springframework.cloud:spring-cloud-starter-aws-jdbc'
implementation 'org.springframework.cloud:spring-cloud-starter-aws-messaging'
implementation 'org.springframework.session:spring-session-core'
implementation 'org.hibernate:hibernate-envers:5.4.18.Final'
// Login Web Form
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper:9.0.37'
implementation 'javax.servlet:jstl:1.2'
// Webjars (for css/js libs)
implementation 'org.webjars:webjars-locator:0.40'
implementation 'org.webjars:bootstrap:4.5.0'
// Amazon Web Service (AWS)
implementation 'org.springframework.cloud:spring-cloud-aws-autoconfigure'
implementation 'org.springframework.cloud:spring-cloud-aws-messaging'
// Other
implementation 'org.apache.commons:commons-lang3:3.10'
implementation 'commons-codec:commons-codec:1.14'
implementation 'org.owasp.esapi:esapi:2.2.0.0'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.6'
implementation 'org.passay:passay:1.6.0'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'mysql:mysql-connector-java'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.spockframework:spock-core:1.3-groovy-2.5'
testImplementation 'org.spockframework:spock-spring:1.3-groovy-2.5'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'com.icegreen:greenmail:1.5.14'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
eclipse {
classpath {
containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
}
}
test {
outputs.dir snippetsDir
reports {
junitXml.enabled = true
html.enabled = true
}
}
codenarc {
toolVersion = "1.1"
codenarcMain {
ignoreFailures false
configFile file('codenarc/codenarc-main.rules')
reports {
xml.enabled = true
html.enabled = true
}
maxPriority1Violations 0
maxPriority2Violations 0
maxPriority3Violations 0
}
codenarcTest {
ignoreFailures false
configFile file('codenarc/codenarc-test.rules')
reports {
xml.enabled = true
html.enabled = true
}
maxPriority1Violations 0
maxPriority2Violations 0
maxPriority3Violations 0
}
}
// ****************************************************************************
// Cobertura Test Coverage Plugin Config
// ****************************************************************************
cobertura {
coverageFormats = ['html', 'xml']
coverageIgnoreTrivial = true
coverageIgnores = ['org.slf4j.Logger.*']
coverageReportDir = new File("$buildDir/reports/cobertura")
}
test.finalizedBy(project.tasks.cobertura)
// ****************************************************************************
// apiDoc Tasks
// ****************************************************************************
node {
version = '14.5.0'
download = true
}
task apidocInstall(type:NpmTask) {
workingDir = file ('./apidoc')
npmCommand = ['install']
}
task apidoc(type:NpmTask, dependsOn:'apidocInstall') {
workingDir = file('./apidoc')
npmCommand = ['run']
args = ['apidoc']
}
processResources.dependsOn.add(apidoc)
// ****************************************************************************
// Pass environment variables to Spring BootRun task when running from Gradle
// ****************************************************************************
bootRun {
bootRun.systemProperties = System.properties
}