-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
101 lines (83 loc) · 2.34 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
import org.gradle.internal.impldep.org.apache.commons.lang.CharEncoding
plugins {
java
`maven-publish`
`java-library`
id("de.chojo.publishdata") version "1.4.0"
alias(libs.plugins.spotless)
}
repositories {
maven("https://eldonexus.de/repository/maven-proxies/")
maven("https://m2.dv8tion.net/releases")
}
dependencies {
api(libs.jda)
api("org.apache.commons", "commons-text", "1.12.0")
// Serialization
api("com.google.guava", "guava", "33.3.0-jre")
api("com.fasterxml.jackson.core", "jackson-databind", "2.17.2")
// web api
api(libs.bundles.javalin)
annotationProcessor(libs.javalin.openapiannotation)
// unit testing
testImplementation(platform("org.junit:junit-bom:5.11.0"))
testImplementation("org.junit.jupiter", "junit-jupiter")
testImplementation("org.mockito", "mockito-core", "5.12.0")
}
spotless {
java {
licenseHeaderFile(rootProject.file("HEADER.txt"))
target("**/*.java")
}
}
group = "de.chojo"
version = "2.10.3+jda-" + libs.versions.jda.get()
description = "Discord utilities for use with JDA"
publishData {
useEldoNexusRepos()
publishComponent("java")
}
publishing {
publications.create<MavenPublication>("maven") {
publishData.configurePublication(this)
}
repositories {
maven {
authentication {
credentials(PasswordCredentials::class) {
username = System.getenv("NEXUS_USERNAME")
password = System.getenv("NEXUS_PASSWORD")
}
}
name = "EldoNexus"
setUrl(publishData.getRepository())
}
}
}
java {
withSourcesJar()
withJavadocJar()
toolchain{
languageVersion.set(JavaLanguageVersion.of(21))
}
}
tasks {
test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
compileJava {
options.encoding = CharEncoding.UTF_8
}
javadoc {
val options = options as StandardJavadocDocletOptions
options.encoding = CharEncoding.UTF_8
options.links(
"https://ci.dv8tion.net/job/JDA/javadoc/",
"https://javadoc.io/doc/io.javalin/javalin/6.2.0/",
"https://javadoc.io/doc/com.google.guava/guava/latest/"
)
}
}