-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
101 lines (83 loc) · 2.45 KB
/
build.gradle.kts
File metadata and controls
101 lines (83 loc) · 2.45 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
import com.vanniktech.maven.publish.MavenPublishBaseExtension
plugins {
id("java-library")
alias(libs.plugins.checkerframework)
alias(libs.plugins.publish)
}
group = "org.allaymc"
version = "3.0.13-SNAPSHOT"
tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
configureEach {
options.isFork = true
}
}
// We already have sources jar, so no need to build Javadoc, which would cause a lot of warnings
withType<Javadoc> {
enabled = false
}
withType<Jar> {
manifest {
attributes("Automatic-Module-Name" to "org.cloudburstmc.nbt")
}
}
withType<Copy> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
withType<Test> {
useJUnitPlatform()
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencies {
checkerFramework(libs.checker)
compileOnly(libs.checker.qual)
testCompileOnly(libs.checker.qual)
testImplementation(libs.junit.jupiter)
testRuntimeOnly(libs.junit.platform.launcher)
testImplementation(libs.jmh.core)
testAnnotationProcessor(libs.jmh.generator.annprocess)
}
configure<MavenPublishBaseExtension> {
publishToMavenCentral()
signAllPublications()
coordinates(project.group.toString(), project.name, project.version.toString())
pom {
name.set(project.name)
description.set("A library for reading and writing NBT data.")
inceptionYear.set("2023")
url.set("https://github.com/AllayMC/NBT")
scm {
connection.set("scm:git:git://github.com/AllayMC/NBT.git")
developerConnection.set("scm:git:ssh:/github.com/AllayMC/NBT.git")
url.set("https://github.com/AllayMC/NBT")
}
licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
name.set("CloudburstMC Team")
organization.set("CloudburstMC")
organizationUrl.set("https://github.com/CloudburstMC")
}
developer {
name.set("AllayMC Team")
organization.set("AllayMC")
organizationUrl.set("https://github.com/AllayMC")
}
}
}
}