-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
276 lines (234 loc) · 7.16 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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.wisepersist:gwt-gradle-plugin:1.+'
}
}
plugins {
id "net.ltgt.apt-eclipse" version "0.15"
id "org.gretty" version "2.2.0"
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'gwt'
apply plugin: 'eclipse'
apply plugin: 'eclipse-wtp'
apply plugin: 'idea'
apply plugin: 'net.ltgt.apt-eclipse'
apply plugin: 'org.gretty'
apply plugin: 'maven'
version = '20190212'
group = "dpornco"
sourceCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
webAppDirName = 'src/main/webapp'
farms {
farm 'Dev', {
loggingLevel="INFO"
httpPort = 9001;
servletContainer = 'tomcat9'
}
farm 'Beta', {
loggingLevel="INFO"
httpPort = 9002;
servletContainer = 'tomcat9'
}
}
products {
product 'Dev', {
}
product 'Beta', {
}
}
war {
archiveName baseName+"."+extension
rootSpec.exclude('co/dporn/gmd/client/**/*.class')
rootSpec.exclude('**/*.gwt.xml')
}
gretty {
loggingLevel="INFO"
httpPort = 8080;
servletContainer = 'tomcat9'
extraResourceBase 'build/gwt/out'
jvmArgs = ['-Dfile.encoding=UTF-8', '-Xmx2048M']
managedClassReload = false
contextPath='/'
}
repositories {
jcenter()
maven { url 'https://jitpack.io' }
}
tasks.withType(org.wisepersist.gradle.plugins.gwt.AbstractGwtActionTask) {
args "-noincremental"
}
gwt {
logLevel = 'INFO'
gwtVersion='2.8.2'
eclipse {
addGwtContainer = true;
}
modules 'co.dporn.gmd.DpornCo'
compiler {
disableClassMetadata = false;
strict = true;
style = "OBF";
localWorkers = 4;
}
superDev {
noPrecompile = true;
failOnError = false;
bindAddress = "0.0.0.0";
}
maxHeapSize = "3128M";
}
configurations {
provided
}
dependencies {
providedCompile 'javax.servlet:javax.servlet-api:3.0.1'
compile 'javax.ws.rs:javax.ws.rs-api:2.0.1'
compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.27'
compile 'org.glassfish.jersey.media:jersey-media-json-jackson:2.27'
compile 'org.glassfish.jersey.inject:jersey-hk2:2.27'
compile 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.9.6'
//sanitizer
compile 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20180219.1'
compile 'com.github.muksihs.steem-java-api-wrapper:steemj-core:99bb733f61'
//compile 'com.github.tommyettinger:RegExodus:v0.1.10' //not used
compile 'org.mongodb:mongodb-driver-sync:3.9.0'
//simplistic server side LRU caching (read LRUMap caveats when mucking with it)
// https://mvnrepository.com/artifact/org.apache.commons/commons-collections4
compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.2'
// https://mvnrepository.com/artifact/commons-io/commons-io
compile group: 'commons-io', name: 'commons-io', version: '2.6'
//for IPFS adding
//compile 'com.github.ipfs:java-ipfs-api:v1.2.2' //switched to direct HTTP API - works better
gwt 'com.google.gwt.eventbinder:eventbinder:1.+'
//for client side image manipulation
gwt 'com.google.elemental2:elemental2-dom:1.0.0-RC1'
// https://mvnrepository.com/artifact/org.slf4j/slf4j-jdk14
compile group: 'org.slf4j', name: 'slf4j-jdk14', version: '1.7.25'
// for html5 push-state and servlet url rewrite back to index page
gwt 'de.knightsoft-net:gwt-pushstate:2.0.0.14'
compile 'org.apache.commons:commons-lang3:3.8.1'
gwt 'de.knightsoft-net:gwt-commons-lang3:3.8.1-0'
gwt group: 'com.google.gwt', name: 'gwt-elemental', version: '2.8.2'
compile 'org.tuckey:urlrewritefilter:4.0.3'
//compile 'com.github.tommyettinger:blazingchain:1.4.4.2' //not used
//gwt group: 'com.github.tommyettinger', name: 'blazingchain', version: '1.4.4.2', classifier: 'sources' //not used
gwt 'com.google.gwt:gwt-user:'+gwt.gwtVersion
providedCompile 'com.google.gwt:gwt-servlet:'+gwt.gwtVersion
gwt 'com.github.nmorel.gwtjackson:gwt-jackson:0.15.4'
gwt 'com.github.gwtmaterialdesign:gwt-material-jquery:2.1.1'
gwt 'com.github.gwtmaterialdesign:gwt-material:2.1.1'
gwt 'com.github.gwtmaterialdesign:gwt-material-themes:2.1.1'
gwt 'com.github.gwtmaterialdesign:gwt-material-addins:2.1.1'
gwt ('com.google.gwt.eventbinder:eventbinder:1.1.0') {
exclude module: 'gwt-user'
}
gwt 'com.ekotrope:gwt-completablefuture:1.0.0'
gwt 'org.fusesource.restygwt:restygwt:2.2.+'
//gwt 'com.google.code.findbugs:jsr305:3.0.0'
//gwt 'javax.xml.bind:jaxb-api:2.3.+'
testCompile 'org.testng:testng:6.+'
}
task "create-dirs" {
doLast{
sourceSets*.java.srcDirs*.each { it.mkdirs() }
sourceSets*.resources.srcDirs*.each { it.mkdirs() }
new File(webAppDirName).mkdirs();
}}
clean.doLast {
file('war').deleteDir()
file('.generated-sources').deleteDir()
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
javadoc.failOnError=false
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 3000, 'seconds'
}
eclipseJdt {
doLast{
File f = file('.settings/org.eclipse.core.resources.prefs')
f.write('eclipse.preferences.version=1\n')
f.append('encoding/<project>=utf-8')
f = file('.settings/org.eclipse.core.runtime.prefs')
f.write('eclipse.preferences.version=1\n')
f.append('line.separator=\\n\n')
}}
eclipse {
project {
name = 'dporn-gmd'
referencedProjects
//webAppDirName = project.webAppDirName //'src/main/webapp'
}
classpath {
plusConfigurations += [configurations.provided]
downloadSources = true
downloadJavadoc = true
}
jdt {
sourceCompatibility=1.8
targetCompatibility=1.8
apt {
// whether annotation processing is enabled in Eclipse
// (isAptEnabled in Kotlin)
aptEnabled = compileJava.aptOptions.annotationProcessing
// where Eclipse will output the generated sources; value is interpreted as per project.file()
genSrcDir = file('.generated-sources/annotations')
// whether annotation processing is enabled in the editor
// (isReconcileEnabled in Kotlin)
reconcileEnabled = true
// a map of annotation processor options; a null value will pass the argument as -Akey rather than -Akey=value
processorOptions = compileJava.aptOptions.processorArgs
}
factorypath {
plusConfigurations = [ configurations.apt, configurations.testApt ]
minusConfigurations = []
}
}
wtp {
facet {
facets = []
facet name: 'jst.java', version: '1.8'
facet name: 'jst.web', version: '3.0'
}
}
}
test {
useTestNG()
outputs.upToDateWhen { false }
dependsOn 'compileJava', 'compileGwt'
maxHeapSize = "2048m"
}
task createPom << {
pom {
project {
groupId 'co.dporn'
artifactId 'gmd'
version '1.0.0'
inceptionYear '2018'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
}.writeTo("pom.xml")
}