-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
90 lines (73 loc) · 2.52 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
buildscript {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.bmuschko:gradle-tomcat-plugin:2.5'
classpath "com.github.node-gradle:gradle-node-plugin:2.2.4"
}
}
apply plugin: 'com.bmuschko.tomcat'
apply plugin: "com.github.node-gradle.node"
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'war'
description = 'kea3'
sourceCompatibility = 8
targetCompatibility = 8
repositories {
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
def tomcatVersion = '8.0.42'
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:8.5.2",
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
compile group: 'org.apache.tomcat', name: 'tomcat-jdbc', version: "${tomcatVersion}"
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'
compile group: 'org.tuckey', name: 'urlrewritefilter', version: '4.0.4'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.14'
compile group: 'com.google.code.gson', name: 'gson', version: '2.2.1'
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.9'
compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.9'
compile group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
compile group: 'org.json', name: 'json', version: '20190722'
}
tomcat {
httpPort = 8080
httpProtocol = 'org.apache.coyote.http11.Http11Nio2Protocol'
ajpProtocol = 'org.apache.coyote.ajp.AjpNio2Protocol'
contextPath = 'kea3'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
def webappDir = "${project.projectDir}/src/main/webapp/"
node {
download = true
nodeModulesDir = file(webappDir)
}
task prepareNpm(type: NpmTask) {
inputs.file("${webappDir}/package.json")
outputs.dir("${webappDir}/node_modules")
args = ["install"]
}
task buildProject(type: NpmTask) {
inputs.file("${webappDir}/.babelrc")
inputs.file("${webappDir}/gruntfile.js")
inputs.files fileTree(webappDir).include('**/*.js').include('**/*.css').exclude('dist/**').exclude('node_modules/**')
outputs.dir("${webappDir}/dist")
dependsOn prepareNpm
args = ["run", "build"]
}
build.dependsOn buildProject