This repository has been archived by the owner on Nov 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
/
build.gradle
122 lines (103 loc) · 4.19 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
plugins {
id 'java'
id 'java-library'
id 'jacoco'
id 'org.springframework.boot' version '2.2.4.RELEASE'
}
apply plugin: 'io.spring.dependency-management'
group 'com.github.coleb1911'
version '1.1'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
repositories {
jcenter()
mavenCentral()
}
dependencies {
// Spring and Hibernate
// Logback is excluded in order to avoid conflict with TinyLog
implementation(group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '2.2.4.RELEASE') {
exclude group: 'ch.qos.logback', module: 'logback-classic'
}
// Included to deserialize timestamps from JSON
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.10.2'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.10.2'
// Spring Web for consuming REST APIs
// Logging framework is, again, excluded to avoid conflict
implementation group: 'org.springframework.data', name: 'spring-data-rest-webmvc', version: '3.2.4.RELEASE'
// Other libraries & APIs
implementation group: 'com.discord4j', name: 'discord4j-core', version: '3.0.12'
implementation group: 'com.sedmelluq', name: 'lavaplayer', version: '1.3.33'
implementation group: 'org.aeonbits.owner', name: 'owner', version: '1.0.10'
implementation group: 'org.reflections', name: 'reflections', version: '0.9.11'
implementation group: 'org.tinylog', name: 'tinylog', version: '1.3.6'
implementation group: 'org.tinylog', name: 'slf4j-binding', version: '1.3.6'
implementation group: 'com.zaxxer', name: 'HikariCP', version: '3.4.1'
implementation group: 'com.h2database', name: 'h2', version: '1.4.200'
implementation group: 'org.postgresql', name: 'postgresql', version: '42.2.9'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
implementation group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
implementation group: 'org.jsoup', name: 'jsoup', version: '1.12.1'
implementation group: 'net.imagej', name: 'ij', version: '1.53b'
// JUnit
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.6.0'
testImplementation group: 'com.github.tomakehurst', name: 'wiremock-jre8', version: '2.25.1'
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.2.4'
// Apache utilities
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.11'
implementation group: 'org.apache.commons', name: 'commons-compress', version: '1.19'
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
// Explicitly declare Netty 0.8.14 for Discord4J
// Using 0.9.x causes a NoClassDefFoundError for reactor.netty.NettyPipeline$SendOptions
implementation group: 'io.projectreactor.netty', name: 'reactor-netty', version: '0.8.14.RELEASE'
}
test {
useJUnitPlatform()
systemProperty 'ghost2.version', project.version
}
bootJar {
exclude 'ghost.properties'
exclude '**/buildtools'
manifest {
attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher'
}
}
compileJava {
inputs.property("moduleName", "ghost2.main")
doFirst {
options.compilerArgs = [
'--module-path', classpath.asPath
]
classpath = files()
}
}
javadoc {
inputs.property("moduleName", "ghost2.main")
source = sourceSets.main.allJava
doFirst {
options.addStringOption('-module-path', classpath.asPath)
options.addBooleanOption('html5', true)
}
}
task ghostPackage(type: JavaExec) {
dependsOn bootJar
main = 'com.github.coleb1911.ghost2.buildtools.RuntimeBuilder'
classpath = sourceSets.main.runtimeClasspath
group = 'build'
}
clean {
delete "${rootDir}/bt_temp"
delete "${rootDir}/bt_out"
delete "${rootDir}/bt_xplatform"
}
jacoco {
toolVersion = "0.8.4"
reportsDir = file("$buildDir/jacoco")
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/jacocoHtml")
}
}