-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
213 lines (174 loc) · 7.74 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
buildscript {
ext { springBootVersion = '2.6.2'
hibernateVersion = '5.11.0.Final'
httpClientVersion = '4.5.11'
swaggerVersion = '3.0.0'
jasyptVersion = '3.0.4'
}
repositories {
mavenCentral()
}
dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath files("lib/gradle-js-plugin-2.14.2-SNAPSHOT.jar") }
}
plugins {
id "com.eriwen.gradle.js" version "2.14.1"
id "com.gorylenko.gradle-git-properties" version "2.3.2"
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'jacoco'
apply plugin: 'project-report'
jar {
archiveBaseName = 'viglet-vecchio'
archiveVersion = '0.3.3'
}
eclipse {
classpath {
file {
whenMerged {
def src = entries.find { it.path == 'src/main/resources' }
src.excludes = ['**']
}
}
}
}
gitProperties {
extProperty = 'gitProps' // git properties will be put in a map at project.ext.gitProps
}
bootJar {
launchScript() // executable jar
manifest {
attributes(
'Implementation-Version': "${-> project.jar.version + '-' + project.ext.gitProps['git.commit.id.abbrev']}"
)
}
}
generateGitProperties.outputs.upToDateWhen { false } // make sure the generateGitProperties task always executes (even when git.properties is not changed)
task printGitProperties(dependsOn: 'generateGitProperties') { // make sure generateGitProperties task to execute before accessing generated properties
doLast {
println "git.commit.id.abbrev=" + project.ext.gitProps['git.commit.id.abbrev']
}
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// Combine JS files
task combineSystemJs(type: com.eriwen.gradle.js.tasks.CombineJsTask) {
source = "${projectDir}/src/main/resources/js/src/system"
dest = "${projectDir}/src/main/resources/js/build/vecSystem.js"
}
task combineFeatureJs(dependsOn: ':combineSystemJs', type: com.eriwen.gradle.js.tasks.CombineJsTask) {
source = "${projectDir}/src/main/resources/js/src/feature"
dest = "${projectDir}/src/main/resources/js/build/vecFeature.js"
}
task combineAllJs(dependsOn: ':combineFeatureJs', type: com.eriwen.gradle.js.tasks.CombineJsTask) {
source = ["${projectDir}/src/main/resources/js/src/main/__vecFactory.js", "${projectDir}/src/main/resources/js/build/vecSystem.js", "${projectDir}/src/main/resources/js/build/vecFeature.js"]
dest = "${projectDir}/src/main/resources/js/build/vecchio.js"
}
task minifyAllJs(dependsOn: ':combineAllJs', type: com.eriwen.gradle.js.tasks.MinifyJsTask) {
source = "${projectDir}/src/main/resources/js/build/vecchio.js"
dest = file("${projectDir}/src/main/resources/public/console/js/dist/vecchio.min.js")
closure {
warningLevel = 'QUIET'
}
}
task stage(dependsOn: ['build', 'clean'])
compileJava.dependsOn(minifyAllJs)
build.mustRunAfter clean
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compile
destinationDir = file("store/doc/javadoc")
}
dependencies {
// Spring Boot
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: "${springBootVersion}"
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version:"${springBootVersion}"
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-parent', version:"${springBootVersion}"
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf', version:"${springBootVersion}"
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-security', version:"${springBootVersion}"
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version:"${springBootVersion}"
// implementation group: 'org.springframework.security.oauth.boot', name: 'spring-security-oauth2-autoconfigure', version:"${springBootVersion}"
// OLTU
implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.authzserver', version:"1.0.2"
implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.resourceserver', version:"1.0.2"
implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.common', version:"1.0.2"
implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.dynamicreg.server', version:"1.0.2"
implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version:"1.0.2"
implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.dynamicreg.client', version:"1.0.2"
// Oracle
implementation group: 'com.oracle.ojdbc', name: 'ojdbc8', version: '19.3.0.0'
// Jasypt
implementation group: 'com.github.ulisesbocchio', name: 'jasypt-spring-boot-starter', version: "${jasyptVersion}"
// Spring
implementation group: 'org.springframework', name: 'spring-test', version: '5.3.17'
// Jackson
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-hibernate5', version: '2.13.1'
// H2
implementation group: 'com.h2database', name: 'h2', version:'2.0.204'
// MariaDB
implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.7.4'
// JSON
implementation group: 'org.json', name: 'json', version:'20211205'
// Apache Commons
implementation group: 'commons-io', name: 'commons-io', version:'2.11.0'
implementation group: 'commons-lang', name: 'commons-lang', version:'2.6'
// Swagger 2
implementation group: 'io.springfox', name: 'springfox-swagger2', version: "${swaggerVersion}"
implementation group: 'io.springfox', name: 'springfox-swagger-ui', version: "${swaggerVersion}"
// WebJars
implementation 'org.webjars.bower:jquery:1.12.4'
implementation 'org.webjars.bower:jquery.ui:1.12.1'
implementation 'org.webjars:bootstrap:5.1.3'
implementation 'org.webjars.bower:bootstrap:4.1.1'
implementation 'org.webjars.bower:moment:2.29.1'
implementation 'org.webjars.bower:angular:1.8.2'
implementation 'org.webjars.bower:ace-builds:1.4.12'
implementation 'org.webjars.bower:tinymce:5.10.2'
implementation 'org.webjars.bower:angular-ui-router:1.0.29'
implementation 'org.webjars.bower:angular-translate:2.18.3'
implementation 'org.webjars.bower:angular-resource:1.8.2'
implementation 'org.webjars.bower:angular-animate:1.8.0'
implementation 'org.webjars.bower:angular-sanitize:1.8.2'
implementation 'org.webjars.bower:angular-bootstrap:2.5.0'
implementation 'org.webjars.bower:angular-cookies:1.8.2'
implementation 'org.webjars.bower:angular-moment:1.2.0'
implementation 'org.webjars.bower:angular-ui-ace:0.2.3'
implementation 'org.webjars.bower:font-awesome:4.7.0'
implementation 'org.webjars.bower:ng-file-upload:12.2.13'
implementation 'org.webjars.bower:angular-ui-notification:0.3.6'
implementation 'org.webjars.bower:angular-ui-tinymce:0.0.19'
implementation 'org.webjars.bower:angular-ui-sortable:0.19.0'
implementation 'org.webjars.bower:angular-ui-select:0.19.8'
implementation 'org.webjars.bower:ngInfiniteScroll:1.3.4'
implementation 'org.webjars.bower:nvd3:1.8.6'
implementation 'org.webjars:d3js:6.6.0'
implementation 'org.webjars:angular-nvd3:1.0.5'
testImplementation('org.springframework.boot:spring-boot-starter-test')
}
test {
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}
bootRun {
if (project.hasProperty('args')) {
args project.args.split(',')
}
}
check.dependsOn jacocoTestReport
}