-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle.kts
110 lines (88 loc) · 3.13 KB
/
build.gradle.kts
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
import org.cadixdev.gradle.licenser.LicenseExtension
plugins {
id("java")
id("maven-publish")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.cadixdev.licenser") version "0.6.1"
}
group = "org.enginehub"
version = "1.0-SNAPSHOT"
configure<JavaPluginExtension> {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
withSourcesJar()
}
repositories {
mavenCentral()
maven {
name = "sponge"
url = uri("https://repo.spongepowered.org/maven")
}
maven {
url = uri("https://maven.enginehub.org/repo/")
}
}
configure<LicenseExtension> {
newLine(false)
header(project.file("HEADER.txt"))
include("**/*.java")
}
tasks.named<JavaCompile>("compileJava") {
options.compilerArgs = listOf("-parameters", "-Werror", "-Aarg.name.key.prefix=")
options.encoding = "UTF-8"
}
tasks.named<Jar>("jar") {
archiveClassifier.set("dev")
}
tasks.named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
archiveClassifier.set("")
exclude("GradleStart**")
exclude(".cache")
exclude("LICENSE*")
exclude("META-INF/maven/**")
manifest.attributes(mapOf("Multi-Release" to "true"))
}
dependencies {
implementation("net.dv8tion:JDA:5.0.0") {
exclude(module="opus-java")
}
implementation("org.spongepowered:configurate-hocon:3.7.2")
implementation("com.typesafe:config:1.4.2")
val pistonVersion = "0.5.7"
implementation("org.enginehub.piston:core:${pistonVersion}")
implementation("org.enginehub.piston:default-impl:${pistonVersion}")
implementation("org.enginehub.piston.core-ap:annotations:${pistonVersion}")
annotationProcessor("org.enginehub.piston.core-ap:processor:${pistonVersion}")
runtimeOnly("org.enginehub.piston.core-ap:runtime:${pistonVersion}")
implementation(platform("com.fasterxml.jackson:jackson-bom:2.13.2.20220328"))
implementation("com.fasterxml.jackson.core:jackson-core")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8")
implementation("com.fasterxml.jackson.module:jackson-module-parameter-names")
val slf4jVersion = "1.7.36"
val log4jVersion = "2.17.2"
// Primarily prefer Log4J for logging.
implementation("org.apache.logging.log4j:log4j-api:$log4jVersion")
// Bind SLF4J over STDOUT [JDA]
runtimeOnly("org.slf4j:slf4j-simple:$slf4jVersion")
// Bind Log4J over SLF4J [Piston, etc.]
runtimeOnly("org.apache.logging.log4j:log4j-to-slf4j:$log4jVersion")
constraints {
implementation("org.slf4j:slf4j-api:$slf4jVersion")
}
implementation("org.apache.commons:commons-text:1.9")
implementation("net.sourceforge.tess4j:tess4j:5.9.0") {
exclude(group = "log4j", module = "log4j")
exclude(group = "commons-logging", module = "commons-logging")
}
testImplementation("junit:junit:4.13.2")
}
configure<PublishingExtension> {
publications {
register<MavenPublication>("java") {
from(components["java"])
}
}
}
tasks.named("assemble") {
dependsOn("shadowJar")
}