Skip to content

Commit

Permalink
3.0.0 - Java 21, MC 1.21.4, thanks @jpenilla for all you do
Browse files Browse the repository at this point in the history
  • Loading branch information
mbax committed Jan 15, 2025
1 parent d321604 commit c089128
Show file tree
Hide file tree
Showing 19 changed files with 238 additions and 179 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ A simple library for storing and retrieving ItemStacks in Bukkit-related environ
Version support
------

Currently, Cardboard Box supports 1.7 through 1.21.3.
Will it need an update for 1.21.4? Maybe.
Currently, Cardboard Box supports 1.7 through 1.21.4.
Requires Java 21.

Will it need an update for 1.21.5? Maybe.
Will it need an update for 1.22? Definitely.

Support
Expand Down Expand Up @@ -50,12 +52,12 @@ maven {


```kotlin
implementation("dev.kitteh:cardboardbox:2.0.2")
implementation("dev.kitteh:cardboardbox:3.0.0")
```
```xml
<dependency>
<groupId>dev.kitteh</groupId>
<artifactId>cardboardbox</artifactId>
<version>2.0.2</version>
<version>3.0.0</version>
</dependency>
```
16 changes: 3 additions & 13 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
plugins {
id("java")
}

repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
`meow-conventions`
}

dependencies {
compileOnly("com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT")
}

java {
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
}
compileOnly("io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT")
}
79 changes: 79 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,80 @@
plugins {
`meow-conventions`
id("io.papermc.paperweight.userdev") version "2.0.0-beta.13" apply false
id("com.gradleup.shadow") version "8.3.5"
id("maven-publish")
}

group = "dev.kitteh"

dependencies {
compileOnly("io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT")
compileOnly("com.mojang:datafixerupper:1.0.20")
implementation(project(":api"))
implementation(project(":v1.20.6", configuration = "reobf"))
implementation(project(":v1.21", configuration = "reobf"))
implementation(project(":v1.21.3", configuration = "reobf"))
implementation(project(":v1.21.4", configuration = "reobf"))
}

tasks.assemble {
dependsOn(tasks.shadowJar)
}

tasks.jar {
archiveClassifier = "original"
}

tasks.shadowJar {
archiveClassifier = ""
}

publishing {
publications {
create<MavenPublication>("cardboardbox") {
artifact(tasks.shadowJar)
groupId = "dev.kitteh"
artifactId = "cardboardbox"
version = "3.0.0"
pom {
name = "CardboardBox"
description = "A Bukkit-related data storage handler"
licenses {
license {
name = "GNU General Public License (GPL) version 3"
url = "https://www.gnu.org/licenses/gpl-3.0.txt"
}
}
developers {
developer {
id = "mbaxter"
name = "Matt Baxter"
email = "[email protected]"
url = "https://www.kitteh.org/"
organization = "Kitteh"
organizationUrl = "https://www.kitteh.org"
roles = setOf("Lead Developer", "Cat Wrangler")
}
}
issueManagement {
system = "GitHub"
url = "https://github.com/KittehOrg/CardboardBox/issues"
}
scm {
connection = "scm:git:git://github.com/KittehOrg/CardboardBox.git"
developerConnection = "scm:git:git://github.com/KittehOrg/CardboardBox.git"
url = "[email protected]:KittehOrg/CardboardBox.git"
}
repositories {
maven {
name = "DependencyDownload"
val rel = "https://dependency.download/releases"
val snap = "https://dependency.download/snapshots"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snap else rel)
credentials(PasswordCredentials::class)
}
}
}
}
}
}
7 changes: 7 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugins {
`kotlin-dsl`
}

repositories {
gradlePluginPortal()
}
24 changes: 24 additions & 0 deletions buildSrc/src/main/kotlin/meow-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import org.gradle.jvm.toolchain.JavaLanguageVersion
import org.gradle.kotlin.dsl.maven
import org.gradle.kotlin.dsl.repositories

plugins {
`java-library`
}

java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
}

repositories {
maven("https://repo.papermc.io/repository/maven-public/")
}

tasks {
withType<JavaCompile>().configureEach {
options.release = 21
}
withType<Javadoc>().configureEach {
options.encoding = Charsets.UTF_8.name()
}
}
82 changes: 0 additions & 82 deletions combined/build.gradle.kts

This file was deleted.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Sat Apr 27 15:28:03 EDT 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
41 changes: 28 additions & 13 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,11 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,22 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,18 +198,28 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
Loading

0 comments on commit c089128

Please sign in to comment.