-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
63 lines (53 loc) · 1.47 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
plugins {
id 'java'
id 'war'
id "org.gradlewebtools.minify" version "1.3.1"
id "org.jlab.cat" version "1.1.0"
}
description = "Web Archive Viewer and Expositor"
group = 'org.jlab'
version = '2.4.2'
ext {
releaseDate = 'April 11 2023'
}
repositories {
mavenCentral()
}
tasks.withType(JavaCompile) {
options.release = 17
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
dependencies {
implementation 'org.glassfish.web:jakarta.servlet.jsp.jstl:2.0.0'
providedCompile 'javax.json:javax.json-api:1.1.4',
'jakarta.servlet:jakarta.servlet-api:6.0.0'
}
task combineJs(type: org.jlab.cat.CatTask) {
from("src/main/webapp/resources/js/src").include('**/*.js')
output = file("${buildDir}/combined-js/combined.js")
}
task minifyJs(type: org.gradlewebtools.minify.JsMinifyTask) {
dependsOn(combineJs)
srcDir = project.file("build/combined-js")
dstDir = project.file("build/minified")
}
war {
archiveFileName = 'wave.war'
filesMatching('WEB-INF/web.xml') {
filter {
line -> line.replaceAll("@VERSION@", project.version)
}
filter {
line -> line.replaceAll("@RELEASE_DATE@", releaseDate)
}
filter {
line -> line.replaceAll("@PRODUCTION_RELEASE@", "true")
}
}
from("${buildDir}/minified") {
include 'combined.min.js'
into 'resources/js'
}
dependsOn minifyJs
}