Skip to content

Commit c089128

Browse files
committed
3.0.0 - Java 21, MC 1.21.4, thanks @jpenilla for all you do
1 parent d321604 commit c089128

File tree

19 files changed

+238
-179
lines changed

19 files changed

+238
-179
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ A simple library for storing and retrieving ItemStacks in Bukkit-related environ
66
Version support
77
------
88

9-
Currently, Cardboard Box supports 1.7 through 1.21.3.
10-
Will it need an update for 1.21.4? Maybe.
9+
Currently, Cardboard Box supports 1.7 through 1.21.4.
10+
Requires Java 21.
11+
12+
Will it need an update for 1.21.5? Maybe.
1113
Will it need an update for 1.22? Definitely.
1214

1315
Support
@@ -50,12 +52,12 @@ maven {
5052

5153

5254
```kotlin
53-
implementation("dev.kitteh:cardboardbox:2.0.2")
55+
implementation("dev.kitteh:cardboardbox:3.0.0")
5456
```
5557
```xml
5658
<dependency>
5759
<groupId>dev.kitteh</groupId>
5860
<artifactId>cardboardbox</artifactId>
59-
<version>2.0.2</version>
61+
<version>3.0.0</version>
6062
</dependency>
6163
```

api/build.gradle.kts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
plugins {
2-
id("java")
3-
}
4-
5-
repositories {
6-
mavenCentral()
7-
maven("https://repo.papermc.io/repository/maven-public/")
2+
`meow-conventions`
83
}
94

105
dependencies {
11-
compileOnly("com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT")
12-
}
13-
14-
java {
15-
targetCompatibility = JavaVersion.VERSION_17
16-
sourceCompatibility = JavaVersion.VERSION_17
17-
}
6+
compileOnly("io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT")
7+
}

build.gradle.kts

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,80 @@
1+
plugins {
2+
`meow-conventions`
3+
id("io.papermc.paperweight.userdev") version "2.0.0-beta.13" apply false
4+
id("com.gradleup.shadow") version "8.3.5"
5+
id("maven-publish")
6+
}
7+
18
group = "dev.kitteh"
9+
10+
dependencies {
11+
compileOnly("io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT")
12+
compileOnly("com.mojang:datafixerupper:1.0.20")
13+
implementation(project(":api"))
14+
implementation(project(":v1.20.6", configuration = "reobf"))
15+
implementation(project(":v1.21", configuration = "reobf"))
16+
implementation(project(":v1.21.3", configuration = "reobf"))
17+
implementation(project(":v1.21.4", configuration = "reobf"))
18+
}
19+
20+
tasks.assemble {
21+
dependsOn(tasks.shadowJar)
22+
}
23+
24+
tasks.jar {
25+
archiveClassifier = "original"
26+
}
27+
28+
tasks.shadowJar {
29+
archiveClassifier = ""
30+
}
31+
32+
publishing {
33+
publications {
34+
create<MavenPublication>("cardboardbox") {
35+
artifact(tasks.shadowJar)
36+
groupId = "dev.kitteh"
37+
artifactId = "cardboardbox"
38+
version = "3.0.0"
39+
pom {
40+
name = "CardboardBox"
41+
description = "A Bukkit-related data storage handler"
42+
licenses {
43+
license {
44+
name = "GNU General Public License (GPL) version 3"
45+
url = "https://www.gnu.org/licenses/gpl-3.0.txt"
46+
}
47+
}
48+
developers {
49+
developer {
50+
id = "mbaxter"
51+
name = "Matt Baxter"
52+
email = "matt@kitteh.org"
53+
url = "https://www.kitteh.org/"
54+
organization = "Kitteh"
55+
organizationUrl = "https://www.kitteh.org"
56+
roles = setOf("Lead Developer", "Cat Wrangler")
57+
}
58+
}
59+
issueManagement {
60+
system = "GitHub"
61+
url = "https://github.com/KittehOrg/CardboardBox/issues"
62+
}
63+
scm {
64+
connection = "scm:git:git://github.com/KittehOrg/CardboardBox.git"
65+
developerConnection = "scm:git:git://github.com/KittehOrg/CardboardBox.git"
66+
url = "git@github.com:KittehOrg/CardboardBox.git"
67+
}
68+
repositories {
69+
maven {
70+
name = "DependencyDownload"
71+
val rel = "https://dependency.download/releases"
72+
val snap = "https://dependency.download/snapshots"
73+
url = uri(if (version.toString().endsWith("SNAPSHOT")) snap else rel)
74+
credentials(PasswordCredentials::class)
75+
}
76+
}
77+
}
78+
}
79+
}
80+
}

buildSrc/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
plugins {
2+
`kotlin-dsl`
3+
}
4+
5+
repositories {
6+
gradlePluginPortal()
7+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import org.gradle.jvm.toolchain.JavaLanguageVersion
2+
import org.gradle.kotlin.dsl.maven
3+
import org.gradle.kotlin.dsl.repositories
4+
5+
plugins {
6+
`java-library`
7+
}
8+
9+
java {
10+
toolchain.languageVersion = JavaLanguageVersion.of(21)
11+
}
12+
13+
repositories {
14+
maven("https://repo.papermc.io/repository/maven-public/")
15+
}
16+
17+
tasks {
18+
withType<JavaCompile>().configureEach {
19+
options.release = 21
20+
}
21+
withType<Javadoc>().configureEach {
22+
options.encoding = Charsets.UTF_8.name()
23+
}
24+
}

combined/build.gradle.kts

Lines changed: 0 additions & 82 deletions
This file was deleted.

gradle/wrapper/gradle-wrapper.jar

-16.9 KB
Binary file not shown.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#Sat Apr 27 15:28:03 EDT 2024
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,11 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
9088

9189
# Use the maximum available, or set MAX_FD != -1 to use that value.
9290
MAX_FD=maximum
@@ -133,22 +131,29 @@ location of your Java installation."
133131
fi
134132
else
135133
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134+
if ! command -v java >/dev/null 2>&1
135+
then
136+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137137
138138
Please set the JAVA_HOME variable in your environment to match the
139139
location of your Java installation."
140+
fi
140141
fi
141142

142143
# Increase the maximum file descriptors if we can.
143144
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
147+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148+
# shellcheck disable=SC2039,SC3045
146149
MAX_FD=$( ulimit -H -n ) ||
147150
warn "Could not query maximum file descriptor limit"
148151
esac
149152
case $MAX_FD in #(
150153
'' | soft) :;; #(
151154
*)
155+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156+
# shellcheck disable=SC2039,SC3045
152157
ulimit -n "$MAX_FD" ||
153158
warn "Could not set maximum file descriptor limit to $MAX_FD"
154159
esac
@@ -193,18 +198,28 @@ if "$cygwin" || "$msys" ; then
193198
done
194199
fi
195200

196-
# Collect all arguments for the java command;
197-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198-
# shell script including quotes and variable substitutions, so put them in
199-
# double quotes to make sure that they get re-expanded; and
200-
# * put everything else in single quotes, so that it's not re-expanded.
201+
202+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204+
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
201210

202211
set -- \
203212
"-Dorg.gradle.appname=$APP_BASE_NAME" \
204213
-classpath "$CLASSPATH" \
205214
org.gradle.wrapper.GradleWrapperMain \
206215
"$@"
207216

217+
# Stop when "xargs" is not available.
218+
if ! command -v xargs >/dev/null 2>&1
219+
then
220+
die "xargs is not available"
221+
fi
222+
208223
# Use "xargs" to parse quoted args.
209224
#
210225
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

0 commit comments

Comments
 (0)