forked from GeyserMC/MCProtocolLib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
112 lines (94 loc) · 2.87 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
111
plugins {
idea
`java-library`
`maven-publish`
alias(libs.plugins.indra)
alias(libs.plugins.indra.git)
alias(libs.plugins.indra.publishing)
alias(libs.plugins.lombok)
}
indra {
github("GeyserMC", "MCProtocolLib")
mitLicense()
publishReleasesTo("opencollab-release-repo", "https://repo.opencollab.dev/maven-releases/")
publishSnapshotsTo("opencollab-snapshot-repo", "https://repo.opencollab.dev/maven-snapshots/")
configurePublications {
pom {
name = "MCProtocolLib"
url = "https://github.com/GeyserMC/MCProtocolLib/"
organization {
name = "GeyserMC"
url = "https://github.com/GeyserMC"
}
developers {
developer {
id = "steveice10"
name = "Steveice10"
email = "[email protected]"
}
developer {
id = "GeyserMC"
name = "GeyserMC"
url = "https://geysermc.org/"
}
}
}
versionMapping {
usage(Usage.JAVA_API) { fromResolutionOf(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME) }
usage(Usage.JAVA_RUNTIME) { fromResolutionResult() }
}
}
javaVersions {
target(17)
strictVersions()
testWith(17)
minimumToolchain(17)
}
}
val repoName = if (version.toString().endsWith("SNAPSHOT")) "maven-snapshots" else "maven-releases"
publishing {
repositories {
maven("https://repo.opencollab.dev/${repoName}/") {
credentials.username = System.getenv("OPENCOLLAB_USERNAME")
credentials.password = System.getenv("OPENCOLLAB_PASSWORD")
name = "opencollab"
}
}
}
dependencies {
// Minecraft related libraries
api(libs.opennbt)
api(libs.mcauthlib)
// Kyori adventure
api(libs.bundles.adventure)
// Math utilities
api(libs.bundles.math)
// Stripped down fastutil
api(libs.bundles.fastutil)
// Netty
api(libs.bundles.netty)
// Test dependencies
testImplementation(libs.junit.jupiter)
}
lombok {
version = libs.versions.lombok.version.get()
}
group = "com.github.steveice10"
version = "1.20.4-2-SNAPSHOT"
description = "MCProtocolLib is a simple library for communicating with Minecraft clients and servers."
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
withJavadocJar()
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.compilerArgs.add("-Xlint:all,-processing")
}
tasks.withType<Javadoc> {
title = "MCProtocolLib Javadocs"
val options = options as StandardJavadocDocletOptions
options.encoding = "UTF-8"
options.addStringOption("Xdoclint:all,-missing", "-quiet")
}