-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
126 lines (95 loc) · 3.49 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
plugins {
id "org.owasp.dependencycheck" version "7.1.0.1"
id 'java'
id 'application'
id 'eclipse'
id 'pmd'
id 'checkstyle'
id 'com.github.spotbugs' version '4.7.1'
}
apply from: 'config/gradle/versioning.gradle'
mainClassName = "org.terasology.web.JettyMain"
applicationName = "meta-server"
group = 'org.terasology.web'
targetCompatibility = '11'
sourceCompatibility = '11'
repositories {
mavenCentral()
maven {
name "Terasology Artifactory"
url "http://artifactory.terasology.io/artifactory/virtual-repo-live"
allowInsecureProtocol true
}
}
ext {
jettyVersion = '9.4.48.v20220622'
}
def codeMetricsDir = "${buildDir}/codeMetrics"
configurations {
codeMetrics
}
dependencies {
implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version: jettyVersion
implementation group: 'org.eclipse.jetty', name: 'jetty-servlets', version: jettyVersion
implementation 'javax.servlet:javax.servlet-api:3.1.0'
implementation 'javax.annotation:javax.annotation-api:1.3.2'
implementation 'com.google.code.findbugs:jsr305:3.0.0'
implementation 'com.sun.xml.bind:jaxb-impl:2.3.3'
implementation group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.1.1'
implementation 'org.glassfish.jersey.containers:jersey-container-jetty-servlet:2.25'
implementation 'org.glassfish.jersey.ext:jersey-mvc-freemarker:2.25'
implementation 'com.google.code.gson:gson:2.9.1'
implementation 'com.google.guava:guava:31.1-jre'
implementation 'org.jooq:jooq:3.14.16'
implementation 'org.mariadb.jdbc:mariadb-java-client:3.1.0'
implementation 'com.squareup.retrofit:retrofit:1.9.0'
implementation 'com.zaxxer:HikariCP:5.0.1'
implementation 'org.terasology:gestalt-module:4.1.2'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
testImplementation 'org.jsoup:jsoup:1.15.2'
testImplementation 'com.jcabi:jcabi-w3c:1.4.0'
testImplementation 'com.jcabi:jcabi-matchers:1.5.3'
testImplementation 'junit:junit:4.13.2'
testImplementation 'com.h2database:h2:1.4.190'
pmd 'net.sourceforge.pmd:pmd-core:6.48.0'
pmd 'net.sourceforge.pmd:pmd-java:6.48.0'
codeMetrics group: 'org.terasology.config', name: 'codemetrics', version: '1.3.2', ext: 'zip'
}
task unpackConfig(type: Sync, dependsOn: configurations.codeMetrics) {
from zipTree(configurations.codeMetrics.singleFile)
into codeMetricsDir
}
tasks.compileJava.dependsOn unpackConfig
checkstyle {
ignoreFailures = true
config = resources.text.fromFile("${codeMetricsDir}/checkstyle/checkstyle.xml")
configProperties.samedir = "${codeMetricsDir}/checkstyle"
}
pmd {
ignoreFailures = true
ruleSetConfig = resources.text.fromFile("${codeMetricsDir}/pmd/pmd.xml")
ruleSets = []
}
spotbugs {
ignoreFailures = true
effort = 'max'
reportLevel = 'medium'
excludeFilter = resources.text.fromFile("${codeMetricsDir}/findbugs/findbugs-exclude.xml").asFile()
}
test {
// ignoreFailures: Specifies whether the build should break when the verifications performed by this task fail.
ignoreFailures = true
// showStandardStreams: makes the standard streams (err and out) visible at console when running tests
testLogging.showStandardStreams = true
}
distributions {
main {
contents {
from('.') {
include 'templates/'
include 'web/'
}
}
}
}
task stage(dependsOn: ['clean', 'installDist'])