-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbuild.gradle
105 lines (82 loc) · 2.51 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
plugins {
id 'war'
id 'com.google.cloud.tools.appengine-appyaml' version '+'
}
apply from: 'build-minify-plugin.gradle'
group = 'com.dencode'
version = '1.0.0-SNAPSHOT'
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
providedCompile 'org.eclipse.jetty:jetty-server:12.0.+'
providedCompile 'org.eclipse.jetty:jetty-slf4j-impl:12.0.+'
providedCompile 'org.eclipse.jetty.ee10:jetty-ee10-webapp:12.0.+'
providedCompile 'org.eclipse.jetty.ee10:jetty-ee10-annotations:12.0.+'
providedCompile 'org.eclipse.jetty.ee10:jetty-ee10-apache-jsp:12.0.+'
implementation 'org.eclipse.jetty.ee10:jetty-ee10-glassfish-jstl:12.0.+'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.+'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.18.+'
implementation 'com.ezylang:EvalEx:3.4.+'
implementation 'com.github.mifmi:mifmi-commons4j:v0.3.+'
implementation 'com.github.mozq:enigma4j:v1.+'
testImplementation 'org.junit.jupiter:junit-jupiter:5.+'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
test {
useJUnitPlatform()
}
appengine {
deploy {
projectId 'GCLOUD_CONFIG'
version 'GCLOUD_CONFIG'
promote false
stopPreviousVersion false
}
}
minifyJs {
source 'src/main/webapp/static/js/commons.js'
source 'src/main/webapp/static/js/analytics.js'
source 'src/main/webapp/static/js/main.js'
source 'src/main/webapp/static/js/adsense.js'
dest "${buildDir}/minify/js/all.min.js"
languageOut 'ECMASCRIPT_2020'
}
war {
dependsOn minifyJs
webInf {
from "${buildDir}/minify/js/"
into "/static/js/"
}
}
task archiveServerMainJar(type: Jar) {
archiveAppendix = 'server-main'
from sourceSets.main.output
include 'com/dencode/web/server/**'
manifest {
attributes 'Main-Class': 'com.dencode.web.server.ServerMain'
}
}
task bundleServer(type: Copy) {
dependsOn archiveServerMainJar, appengineStage
from archiveServerMainJar.archiveFile
from configurations.providedCompile
into appengine.stage.stagingDirectory
}
task appRunStage(type: JavaExec) {
dependsOn bundleServer
mainClass = 'com.dencode.web.server.ServerMain'
environment PORT: 8080
workingDir appengine.stage.stagingDirectory
classpath "${appengine.stage.stagingDirectory}/*"
}
appengineDeploy {
dependsOn bundleServer
}