-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
97 lines (82 loc) · 2.06 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
import com.diffplug.gradle.spotless.SpotlessPlugin
import de.chojo.PublishData
plugins {
java
alias(libs.plugins.spotless)
alias(libs.plugins.publishdata)
alias(libs.plugins.shadow)
`maven-publish`
}
group = "de.eldoria.schematic-sanitizer"
version = "1.0.8"
allprojects {
apply {
plugin<SpotlessPlugin>()
plugin<JavaPlugin>()
plugin<PublishData>()
plugin<MavenPublishPlugin>()
}
repositories {
mavenLocal()
mavenCentral()
maven("https://eldonexus.de/repository/maven-public/")
maven("https://eldonexus.de/repository/maven-proxies/")
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.11.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
withSourcesJar()
withJavadocJar()
}
spotless {
java {
licenseHeaderFile(rootProject.file("HEADER.txt"))
target("**/*.java")
}
}
tasks {
compileJava {
options.encoding = "UTF-8"
}
compileTestJava {
options.encoding = "UTF-8"
}
javadoc {
options.encoding = "UTF-8"
}
test {
dependsOn(spotlessCheck)
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
}
}
publishData {
addBuildData()
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")
}
}
setUrl(publishData.getRepository())
name = "EldoNexus"
}
}
}