This repository was archived by the owner on Jun 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.gradle
More file actions
127 lines (94 loc) · 3.05 KB
/
build.gradle
File metadata and controls
127 lines (94 loc) · 3.05 KB
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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java'
id 'idea'
id 'application'
id "com.github.johnrengelman.shadow" version "7.1.0"
}
mainClassName = "de.slimecloud.slimeball.main.Main"
group 'com.slimebot'
version '3.9.4'
repositories {
mavenCentral()
maven { url 'https://maven.mineking.dev/releases' }
maven { url 'https://maven.mineking.dev/snapshots' }
maven { url 'https://maven.cyklon.dev/snapshots' }
maven { url 'https://maven.cyklon.dev/snapshots' }
maven { url 'https://jitpack.io/' }
}
String lombokDependency = 'org.projectlombok:lombok:1.18.32'
dependencies {
implementation 'net.dv8tion:JDA:5.0.0-beta.23'
implementation 'de.mineking:DiscordUtils:3.9.0'
implementation 'de.mineking:JavaUtils:1.9.0'
implementation 'de.mineking:DatabaseUtils:442b063'
implementation 'de.cyklon:ReflectionUtils:7b1e68b'
implementation 'de.cyklon:JEvent:c3ccb12'
implementation 'se.michaelthelin.spotify:spotify-web-api-java:9.0.0-RC1'
implementation 'net.fellbaum:jemoji:1.5.2'
implementation 'org.kohsuke:github-api:2.0.0-alpha-2'
implementation 'io.javalin:javalin:6.4.0'
implementation 'io.github.cdimascio:java-dotenv:5.2.2'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'org.sejda.imageio:webp-imageio:0.1.6'
implementation 'ch.qos.logback:logback-classic:1.5.16'
implementation 'org.postgresql:postgresql:42.7.3'
implementation 'org.jdbi:jdbi3-postgres:3.45.1'
compileOnly 'org.jetbrains:annotations:24.1.0'
compileOnly lombokDependency
annotationProcessor lombokDependency
testCompileOnly lombokDependency
testAnnotationProcessor lombokDependency
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.0-M1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
}
String getVersion() {
String version = project.version.toString()
try {
String commit = 'git rev-parse --verify --short HEAD'.execute().text.trim()
version += "-" + commit
} catch (IOException ignore) {
version += "-unknown"
}
return version
}
tasks.register("prepareSources", Copy) {
delete("$buildDir/preparedSources")
from("src/main/java") {
include("**/BuildInfo.java")
filter(ReplaceTokens, "tokens":
Map.of(
"VERSION", getVersion()
)
)
}
into("$buildDir/preparedSources")
includeEmptyDirs = false
}
compileJava {
FileTree javaSources = sourceSets.main.allJava.filter {
it.name != "BuildInfo.java"
}.asFileTree
source = javaSources + fileTree("$buildDir/preparedSources")
dependsOn "prepareSources"
options.encoding = 'UTF-8'
options.compilerArgs << '-parameters'
}
jar {
manifest {
attributes 'Main-Class': mainClassName
}
}
shadowJar {
archiveFileName = "SlimeBot.jar"
}
test {
useJUnitPlatform()
systemProperty "file.encoding", "utf-8"
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}