Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-110 Add parcel receiving logic #118

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f24c5c5
Remove recipients field from Parcel object. Convert GuiView to interface
Jakubk15 Feb 5, 2025
bc1f26a
Create ParcelCollectionGui. Simplify unit test. Add more config entries.
Jakubk15 Feb 5, 2025
44e65d7
Remove builder() method from Parcel
Jakubk15 Feb 5, 2025
d121759
Fix test
Jakubk15 Feb 5, 2025
9cda801
Exclude gson from relocation. Enable auto-relocation
Jakubk15 Feb 8, 2025
3982f80
Move checkstyle config to gradle/
Jakubk15 Feb 8, 2025
853ec0e
Rename ExceptionHandler to SentryExceptionHandler
Jakubk15 Feb 8, 2025
d39695b
Add ParcelManager#collectParcel method
Jakubk15 Feb 8, 2025
893132e
Fix relocation. Add Blossom replacement tokens
Jakubk15 Feb 8, 2025
c6c3262
Update src/main/java/com/eternalcode/parcellockers/gui/implementation…
Jakubk15 Feb 8, 2025
965fc3e
Remove checkstyle
Jakubk15 Feb 8, 2025
c0951e4
Merge remote-tracking branch 'origin/receiving-logic' into receiving-…
Jakubk15 Feb 8, 2025
2b3dde9
Implement removeAll() methods. Add DebugCommand. Fix ParcelCollectionGui
Jakubk15 Feb 8, 2025
42817d9
Implement parcel collection logic, minor code improvements
Jakubk15 Feb 15, 2025
4def015
Improve pagination logic
Jakubk15 Feb 15, 2025
fd01b8a
Update src/main/java/com/eternalcode/parcellockers/command/debug/Debu…
Jakubk15 Feb 15, 2025
2c63ae7
Update src/main/java/com/eternalcode/parcellockers/gui/implementation…
Jakubk15 Feb 15, 2025
ce8c10f
Merge remote-tracking branch 'origin/receiving-logic' into receiving-…
Jakubk15 Feb 15, 2025
8c5d200
Unify repository method naming
Jakubk15 Feb 15, 2025
a42e565
Fix build. Improve run-task tasks
Jakubk15 Feb 15, 2025
5b92da4
Fix CompletionException. Improve DebugCommand
Jakubk15 Feb 15, 2025
91387c7
apply coderabbit suggestion
Jakubk15 Feb 15, 2025
9d0b2cc
Fix items shift. Give items synchronously. migrate to commons ItemUti…
Jakubk15 Feb 15, 2025
85d9997
remove todo
Jakubk15 Feb 15, 2025
16d7cb6
Correct version in gradle
Jakubk15 Feb 15, 2025
932cd53
Update src/main/java/com/eternalcode/parcellockers/parcel/ParcelManag…
Jakubk15 Feb 16, 2025
2092096
Update src/main/java/com/eternalcode/parcellockers/command/debug/Debu…
Jakubk15 Feb 16, 2025
6c4bcf5
Update src/main/java/com/eternalcode/parcellockers/command/debug/Debu…
Jakubk15 Feb 16, 2025
693d1c9
Update src/main/java/com/eternalcode/parcellockers/command/debug/Debu…
Jakubk15 Feb 16, 2025
acf44b9
Update src/main/java/com/eternalcode/parcellockers/command/debug/Debu…
Jakubk15 Feb 16, 2025
26fdfd2
Update src/main/java/com/eternalcode/parcellockers/command/debug/Debu…
Jakubk15 Feb 16, 2025
993df00
Update src/main/java/com/eternalcode/parcellockers/command/debug/Debu…
Jakubk15 Feb 16, 2025
2c58d76
Reformat code, do not use * imports
Jakubk15 Feb 16, 2025
92993ca
Merge branch 'receiving-logic' of https://github.com/EternalCodeTeam/…
Jakubk15 Feb 16, 2025
89441b1
Import necessary classes
Jakubk15 Feb 16, 2025
2553e7a
Do not create instance of ParcelCollectionGui every time.
Jakubk15 Feb 16, 2025
9806ceb
Update src/main/java/com/eternalcode/parcellockers/configuration/impl…
Jakubk15 Feb 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ greatly accelerate the bug fixing process 🥳
- [SignGUI](https://github.com/Rapha149/SignGUI)

## :heart: Special Thanks

[<img src="https://user-images.githubusercontent.com/65517973/210912946-447a6b9a-2685-4796-9482-a44bffc727ce.png" alt="JetBrains" width="150">](https://www.jetbrains.com)
[<img src=".github/assets/sentry.svg" alt="Sentry logo" width="150" height="150">](https://www.sentry.io)

Expand Down
79 changes: 52 additions & 27 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import xyz.jpenilla.runtask.task.AbstractRun

plugins {
`java-library`
checkstyle
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
id("xyz.jpenilla.run-paper") version "2.3.1"
id("com.gradleup.shadow") version "8.3.5"
id("com.gradleup.shadow") version "9.0.0-beta8"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Consider using a stable version of shadow plugin.

Using beta version 9.0.0-beta8 in production could lead to unexpected issues.


🌐 Web query:

What is the latest stable version of gradle shadow plugin?

💡 Result:

The latest stable version of the Gradle Shadow Plugin is v8.3.1, released on September 10, 2024[1][10]. This version includes compatibility updates and fixes for issues like excluding Gradle APIs in Java Gradle Plugin publications[1][10].

Key Changes in v8.x Series:

  • v8.3.x introduced breaking changes to align with Gradle standards:
    • Plugin ID changed from com.github.johnrengelman.shadow to com.gradleup.shadow[1][5].
    • Maven coordinates updated to com.gradleup.shadow:shadow-gradle-plugin[1][5].
  • v9.x releases (e.g., 9.0.0-beta7, 9-beta) are still in beta as of February 2025[1][5].

For production use with Java projects targeting Java ≤11 or needing stability, v8.3.x remains recommended until v9 stabilizes[1][10].

Citations:


Switch to a Stable Shadow Plugin Version

  • In build.gradle.kts at line 7, you're using the beta version "9.0.0-beta8".
  • For better production stability, please update the version to the latest stable release "8.3.1".
-    id("com.gradleup.shadow") version "9.0.0-beta8"
+    id("com.gradleup.shadow") version "8.3.1"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
id("com.gradleup.shadow") version "9.0.0-beta8"
id("com.gradleup.shadow") version "8.3.1"

}

group = "com.eternalcode"
version = "1.0.0-SNAPSHOT"
version = "0.0.1-SNAPSHOT"
description =
"Plugin that provides functionality of parcel lockers in Minecraft, allowing players to send and receive parcels safely."

Expand Down Expand Up @@ -36,8 +37,9 @@ dependencies {
// skull api
implementation("dev.rollczi:liteskullapi:1.3.0")

// gui library
// gui
implementation("dev.triumphteam:triumph-gui:3.1.11")
implementation("de.rapha149.signgui:signgui:2.5.0")

// economy
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1")
Expand Down Expand Up @@ -71,9 +73,6 @@ dependencies {
// paperlib
implementation("io.papermc:paperlib:1.0.8")

// signgui
implementation("de.rapha149.signgui:signgui:2.5.0")

// panda-utilities
implementation("org.panda-lang:panda-utilities:0.5.2-alpha")

Expand All @@ -84,8 +83,8 @@ dependencies {
implementation("com.spotify:completable-futures:0.3.6")

// eternalcode-commons
implementation("com.eternalcode:eternalcode-commons-adventure:1.1.5")
implementation("com.eternalcode:eternalcode-commons-bukkit:1.1.5")
implementation("com.eternalcode:eternalcode-commons-adventure:1.1.6")
implementation("com.eternalcode:eternalcode-commons-bukkit:1.1.6")

testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.4")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.11.4")
Expand All @@ -100,15 +99,6 @@ java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}

checkstyle {
toolVersion = "10.21.1"

configFile = file("${rootDir}/config/checkstyle/checkstyle.xml")

maxErrors = 0
maxWarnings = 0
}

bukkit {
main = "com.eternalcode.parcellockers.ParcelLockers"
apiVersion = "1.13"
Expand All @@ -118,7 +108,7 @@ bukkit {
description =
"Plugin that provides functionality of parcel lockers in Minecraft, allowing players to send and receive parcels safely."
website = "https://github.com/EternalCodeTeam/ParcelLockers"
version = "1.0.0-SNAPSHOT"
version = project.version.toString()
}

tasks.withType<JavaCompile> {
Expand All @@ -128,11 +118,33 @@ tasks.withType<JavaCompile> {
options.release = 21
}

tasks.withType(AbstractRun::class) {
javaLauncher = javaToolchains.launcherFor {
vendor = JvmVendorSpec.JETBRAINS
languageVersion = JavaLanguageVersion.of(21)
}
jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods")
}

tasks {
runServer {
minecraftVersion("1.21.4")
}

cleanPaperPluginsCache {
doLast {
project.file("run/plugins").deleteRecursively()
}
}

cleanPaperCache {
doLast {
project.file("run/cache").deleteRecursively()
project.file("run/logs").deleteRecursively()
project.file("run/versions").deleteRecursively()
}
}

test {
useJUnitPlatform()
}
Expand All @@ -145,25 +157,38 @@ tasks {
"org/jetbrains/annotations/**",
"META-INF/**",
"javax/**",
"javassist/**",
"org/h2/util/**"
)

mergeServiceFiles()
minimize {
exclude(dependency("de\\.rapha149\\.signgui:signgui:.*")) // https://github.com/Rapha149/SignGUI/issues/15
}

val prefix = "com.eternalcode.parcellockers.libs"
val relocationPrefix = "com.eternalcode.parcellockers.libs"
listOf(
"panda",
"org.panda_lang",
"net.dzikoysk",
"io.papermc.lib",
"org.bstats",
"dev.rollczi",
"net.kyori",
"org.json",
"org.postgresql",
"net.dzikoysk",
"net.kyori",
"io.papermc",
"io.sentry",
"dev.rollczi",
"de.eldoria",
"com.eternalcode.commons",
"com.eternalcode.gitcheck",
"com.fasterxml",
"de.rapha149"
).forEach { relocate(it, prefix) }
"com.j256",
"com.spotify",
"com.zaxxer",
"de.rapha149",
"dev.triumphteam"
).forEach { relocate(it, "$relocationPrefix.$it") }
}
}



217 changes: 0 additions & 217 deletions config/checkstyle/checkstyle.xml

This file was deleted.

6 changes: 0 additions & 6 deletions config/checkstyle/suppressions.xml

This file was deleted.

7 changes: 7 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx4096M -XX:MaxMetaspaceSize=2048m
org.gradle.parallel=true
org.gradle.workers.max=8
org.gradle.caching=true
#org.gradle.configuration-cache=true
org.gradle.vfs.watch=true
Loading