-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
79 lines (67 loc) · 1.97 KB
/
build.gradle.kts
File metadata and controls
79 lines (67 loc) · 1.97 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.eclipse.jgit.api.Git
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.time.LocalDateTime
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
plugins {
kotlin("jvm") version "2.1.20"
id("com.gradleup.shadow") version "9.0.0-beta12"
}
group = "xyz.irodev"
version = LocalDateTime.ofEpochSecond(
Git.open(projectDir).log().setMaxCount(1).call().iterator().next().commitTime.toLong(),
0,
ZoneOffset.of("+9")
).format(DateTimeFormatter.ofPattern("yyyy.MM.dd-HHmm"))
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.eclipse.jgit:org.eclipse.jgit:7.2.0.202503040940-r")
}
}
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
@Suppress("VulnerableLibrariesLocal", "RedundantSuppression")
compileOnly("com.velocitypowered:velocity-api:3.4.0-SNAPSHOT")
implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.24.3")
implementation("org.mariadb.jdbc:mariadb-java-client:3.5.3")
implementation("net.dv8tion:JDA:5.5.1") {
exclude(module = "opus-java")
}
implementation("org.jetbrains.exposed:exposed-core:1.0.0-beta-1")
implementation("org.jetbrains.exposed:exposed-dao:1.0.0-beta-1")
implementation("org.jetbrains.exposed:exposed-jdbc:1.0.0-beta-1")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
}
kotlin {
jvmToolchain(17)
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
tasks {
withType<ShadowJar> {
dependencies {
exclude(dependency("org.slf4j:slf4j-api"))
}
}
withType<ProcessResources> {
val props = "version" to version
inputs.properties(props)
filteringCharset = "UTF-8"
filesMatching("velocity-plugin.json") {
expand(props)
}
}
build {
dependsOn(shadowJar)
}
}