-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add public API module #242
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
Open
Jakubk15
wants to merge
31
commits into
master
Choose a base branch
from
codex/issue-176-api-module
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
0be96c4
chore: ignore local worktrees
Jakubk15 6f01fb6
docs: design ParcelLockers API module
Jakubk15 be98f38
docs: plan ParcelLockers API module implementation
Jakubk15 7ecefcb
build: split API and plugin modules
Jakubk15 6bea75b
feat: extract parcel and locker API contracts
Jakubk15 9841eb0
feat: expose locker service implementation
Jakubk15 e60fa90
feat: expose ParcelLockers API provider
Jakubk15 57c52e1
build: publish ParcelLockers API artifact
Jakubk15 d2b29a2
fix: route public sends through dispatch workflow
Jakubk15 56b3d15
fix: compensate failed parcel dispatch setup
Jakubk15 1c0f319
fix: reserve sender storage during dispatch
Jakubk15 11457bd
fix: enforce item storage consistency protocol
Jakubk15 5d6ddc9
fix: serialize item storage owner operations
Jakubk15 110bd8e
style: remove trailing whitespace
Jakubk15 d27dbf4
fix: enforce public parcel operation contracts
Jakubk15 d8356fe
fix: enforce parcel operation integrity
Jakubk15 b2588c2
fix: serialize parcel lifecycle mutations
Jakubk15 7d14ed1
fix: harden parcel operation coordination
Jakubk15 820eea9
fix: preserve admin parcel lifecycle integrity
Jakubk15 7143301
Merge origin/master into codex/issue-176-api-module
Jakubk15 c8383a5
codestyle changes
Jakubk15 212e5c1
properly annotate fields
Jakubk15 ab8ee53
Merge branch 'master' into codex/issue-176-api-module
Jakubk15 76c0fec
remove unnecessary whitespace
Jakubk15 7713d85
Delete parcellockers-api/src/test/java/com/eternalcode/parcellockers/…
Jakubk15 0ae9b5e
Update AGENTS.md
Jakubk15 9eee03d
Merge branch 'codex/issue-176-api-module' of https://github.com/Etern…
Jakubk15 b659a48
dependency: Update Gradle to v9.7.1 (#243)
renovate[bot] 28f933e
dependency: Update junit-framework monorepo to v6.1.3 (#244)
renovate[bot] b521b65
dependency: Update dependency com.discord4j:discord4j-core to v3.3.3 …
renovate[bot] be5a1b4
dependency: Update plugin xyz.jpenilla.run-paper to v3.1.0 (#245)
renovate[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ build/ | |
| .codex/ | ||
| .gemini/ | ||
| graphify-out/ | ||
| .worktrees/ | ||
|
|
||
| .DS_Store | ||
| [Dd]esktop.ini | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| AGENTS.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,211 +1,40 @@ | ||
| import net.minecrell.pluginyml.paper.PaperPluginDescription | ||
| import xyz.jpenilla.runtask.task.AbstractRun | ||
|
|
||
| plugins { | ||
| id("java") | ||
| id("de.eldoria.plugin-yml.paper") version "0.9.0" | ||
| id("xyz.jpenilla.run-paper") version "3.0.2" | ||
| id("com.gradleup.shadow") version "9.6.1" | ||
| id("com.modrinth.minotaur") version "2.+" | ||
| } | ||
|
|
||
| group = "com.eternalcode" | ||
| version = "0.5.1-BETA" | ||
|
|
||
| repositories { | ||
| maven("https://maven-central.storage-download.googleapis.com/maven2/") // maven central mirror | ||
|
|
||
| maven("https://repo.triumphteam.dev/snapshots/") | ||
| maven("https://jitpack.io") | ||
| maven("https://repo.papermc.io/repository/maven-public/") | ||
| maven("https://repo.eternalcode.pl/releases") | ||
| maven("https://storehouse.okaeri.eu/repository/maven-public/") | ||
| maven("https://nexus.scarsz.me/content/groups/public/") // DiscordSRV | ||
| } | ||
|
|
||
| dependencies { | ||
| // minecraft development api | ||
| compileOnly("io.papermc.paper:paper-api:${Versions.PAPER_API}") | ||
| paperLibrary("dev.rollczi:litecommands-bukkit:${Versions.LITECOMMANDS}") | ||
| paperLibrary("dev.rollczi:litecommands-adventure:${Versions.LITECOMMANDS}") | ||
|
|
||
| // gui | ||
| paperLibrary("dev.triumphteam:triumph-gui-paper:${Versions.TRIUMPH_GUI}") | ||
|
|
||
| // configs | ||
| paperLibrary("eu.okaeri:okaeri-configs-serdes-commons:${Versions.OKAERI_CONFIGS}") | ||
| paperLibrary("eu.okaeri:okaeri-configs-serdes-bukkit:${Versions.OKAERI_CONFIGS}") | ||
| paperLibrary("eu.okaeri:okaeri-configs-yaml-bukkit:${Versions.OKAERI_CONFIGS}") | ||
|
|
||
| // gitcheck | ||
| paperLibrary("com.eternalcode:gitcheck:${Versions.GITCHECK}") | ||
|
|
||
| // metrics | ||
| implementation("org.bstats:bstats-bukkit:${Versions.BSTATS}") | ||
|
|
||
| // database | ||
| paperLibrary("com.zaxxer:HikariCP:${Versions.HIKARICP}") | ||
| paperLibrary("com.j256.ormlite:ormlite-jdbc:${Versions.ORMLITE}") | ||
| paperLibrary("com.h2database:h2:${Versions.H2}") | ||
| paperLibrary("org.postgresql:postgresql:${Versions.POSTGRESQL}") | ||
|
|
||
| // lombok | ||
| compileOnly("org.projectlombok:lombok:${Versions.LOMBOK}") | ||
| annotationProcessor("org.projectlombok:lombok:${Versions.LOMBOK}") | ||
|
|
||
| // jetbrains annotations | ||
| compileOnly("org.jetbrains:annotations:${Versions.JETBRAINS_ANNOTATIONS}") | ||
|
|
||
| // jackson-bukkit | ||
| paperLibrary("de.eldoria.jacksonbukkit:paper:${Versions.JACKSON_BUKKIT}") | ||
|
|
||
| // completable-futures | ||
| paperLibrary("com.spotify:completable-futures:${Versions.COMPLETABLE_FUTURES}") | ||
|
|
||
| // eternalcode commons | ||
| paperLibrary("com.eternalcode:eternalcode-commons-adventure:${Versions.ETERNALCODE_COMMONS}") | ||
| paperLibrary("com.eternalcode:eternalcode-commons-bukkit:${Versions.ETERNALCODE_COMMONS}") | ||
| paperLibrary("com.eternalcode:eternalcode-commons-shared:${Versions.ETERNALCODE_COMMONS}") | ||
|
|
||
| // multification | ||
| paperLibrary("com.eternalcode:multification-bukkit:${Versions.MULTIFICATION}") | ||
| paperLibrary("com.eternalcode:multification-okaeri:${Versions.MULTIFICATION}") | ||
|
|
||
| // caffeine | ||
| paperLibrary("com.github.ben-manes.caffeine:caffeine:${Versions.CAFFEINE}") | ||
|
|
||
| // vault | ||
| compileOnly("com.github.MilkBowl:VaultAPI:${Versions.VAULT_API}") | ||
|
|
||
| // discord integration library | ||
| paperLibrary("com.discord4j:discord4j-core:${Versions.DISCORD4J}") | ||
|
|
||
| // discordsrv (optional integration) | ||
| compileOnly("com.discordsrv:discordsrv:${Versions.DISCORDSRV}") | ||
|
|
||
| testImplementation("org.junit.jupiter:junit-jupiter-api:${Versions.JUNIT}") | ||
| testImplementation("org.junit.jupiter:junit-jupiter-params:${Versions.JUNIT}") | ||
| testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Versions.JUNIT}") | ||
| testRuntimeOnly("org.junit.platform:junit-platform-launcher") | ||
|
|
||
| testImplementation("org.mockito:mockito-core:${Versions.MOCKITO}") | ||
|
|
||
| testImplementation("org.testcontainers:junit-jupiter:${Versions.TESTCONTAINERS}") | ||
| testImplementation("org.testcontainers:mysql:${Versions.TESTCONTAINERS}") | ||
| testImplementation("com.zaxxer:HikariCP:${Versions.HIKARICP}") | ||
| testImplementation("com.j256.ormlite:ormlite-jdbc:${Versions.ORMLITE}") | ||
| testImplementation("com.h2database:h2:${Versions.H2}") | ||
| testImplementation("mysql:mysql-connector-java:${Versions.MYSQL_CONNECTOR}") | ||
| testImplementation("de.eldoria.jacksonbukkit:paper:${Versions.JACKSON_BUKKIT}") | ||
| testImplementation("com.eternalcode:eternalcode-commons-adventure:${Versions.ETERNALCODE_COMMONS}") | ||
| testImplementation("com.eternalcode:eternalcode-commons-bukkit:${Versions.ETERNALCODE_COMMONS}") | ||
| testImplementation("com.eternalcode:eternalcode-commons-shared:${Versions.ETERNALCODE_COMMONS}") | ||
| testImplementation("com.eternalcode:multification-bukkit:${Versions.MULTIFICATION}") | ||
| testImplementation("com.github.MilkBowl:VaultAPI:${Versions.VAULT_API}") | ||
| testImplementation("dev.triumphteam:triumph-gui-paper:${Versions.TRIUMPH_GUI}") | ||
|
|
||
| testImplementation("io.papermc.paper:paper-api:${Versions.PAPER_API}") | ||
| testImplementation("eu.okaeri:okaeri-configs-yaml-bukkit:${Versions.OKAERI_CONFIGS}") | ||
| } | ||
|
|
||
| java { | ||
| toolchain.languageVersion.set(JavaLanguageVersion.of(21)) | ||
| } | ||
|
|
||
| paper { | ||
| name = "ParcelLockers" | ||
| main = "com.eternalcode.parcellockers.ParcelLockers" | ||
| version = project.version.toString() | ||
| apiVersion = "1.21" | ||
| author = "EternalCodeTeam" | ||
| website = "https://github.com/EternalCodeTeam/ParcelLockers" | ||
| loader = "com.eternalcode.parcellockers.ParcelLockersLibraryLoader" | ||
| generateLibrariesJson = true | ||
| foliaSupported = false | ||
| serverDependencies { | ||
| register("Vault") { | ||
| required = true | ||
| load = PaperPluginDescription.RelativeLoadOrder.BEFORE | ||
| } | ||
| register("DiscordSRV") { | ||
| required = false | ||
| load = PaperPluginDescription.RelativeLoadOrder.BEFORE | ||
| } | ||
| id("de.eldoria.plugin-yml.paper") version "0.9.0" apply false | ||
| id("xyz.jpenilla.run-paper") version "3.1.0" apply false | ||
| id("com.gradleup.shadow") version "9.6.1" apply false | ||
| id("com.modrinth.minotaur") version "2.+" apply false | ||
| } | ||
|
|
||
| allprojects { | ||
| group = "com.eternalcode" | ||
| version = "0.5.1-BETA" | ||
|
|
||
| repositories { | ||
| maven("https://maven-central.storage-download.googleapis.com/maven2/") | ||
| maven("https://repo.triumphteam.dev/snapshots/") | ||
| maven("https://jitpack.io") | ||
| maven("https://repo.papermc.io/repository/maven-public/") | ||
| maven("https://repo.eternalcode.pl/releases") | ||
| maven("https://storehouse.okaeri.eu/repository/maven-public/") | ||
| maven("https://nexus.scarsz.me/content/groups/public/") | ||
| } | ||
| } | ||
|
|
||
| tasks.withType<JavaCompile> { | ||
| options.encoding = "UTF-8" | ||
| options.isIncremental = true | ||
| options.compilerArgs.add("-parameters") | ||
| options.release = 21 | ||
| } | ||
| subprojects { | ||
| apply(plugin = "java") | ||
|
|
||
| tasks.withType<AbstractRun> { | ||
| javaLauncher = javaToolchains.launcherFor { | ||
| vendor = JvmVendorSpec.ADOPTIUM | ||
| languageVersion = JavaLanguageVersion.of(25) | ||
| extensions.configure<JavaPluginExtension> { | ||
| toolchain.languageVersion.set(JavaLanguageVersion.of(21)) | ||
| } | ||
| } | ||
|
|
||
| modrinth { | ||
| token.set(providers.environmentVariable("MODRINTH_TOKEN")) | ||
| projectId.set("parcellockers") | ||
| versionNumber.set(project.version.toString()) | ||
| versionType.set(getVersionType(project.version.toString())) | ||
| // changelog.set(providers.environmentVariable("MODRINTH_CHANGELOG")) | ||
| debugMode.set(providers.environmentVariable("MODRINTH_DEBUG").map(String::toBoolean).orElse(false)) | ||
| uploadFile.set(tasks.shadowJar) | ||
| gameVersions.addAll("1.21.11", "26.1", "26.1.1", "26.1.2", "26.2") | ||
| loaders.addAll("bukkit", "paper", "purpur") | ||
| syncBodyFrom = rootProject.file("README.md").readText() | ||
| } | ||
|
|
||
| tasks { | ||
| runServer { | ||
| minecraftVersion("26.2") | ||
| downloadPlugins { | ||
| modrinth("luckperms", "v5.5.53-bukkit") | ||
| modrinth("vaultunlocked", "2.20.2") | ||
| modrinth("essentialsx", "2.22.0") | ||
| // modrinth("discordsrv", "1.30.4") // uncomment to test with DiscordSRV integration | ||
| } | ||
| jvmArgs( | ||
| "-Dcom.mojang.eula.agree=true", | ||
| "-Xlog:aot=info" | ||
| ) | ||
| // jvmArgs("-XX:AOTCacheOutput=server.aot") | ||
| jvmArgs("-XX:AOTCache=server.aot") | ||
| tasks.withType<JavaCompile>().configureEach { | ||
| options.encoding = "UTF-8" | ||
| options.isIncremental = true | ||
| options.compilerArgs.add("-parameters") | ||
| options.release = 21 | ||
| } | ||
|
|
||
| test { | ||
| tasks.withType<Test>().configureEach { | ||
| useJUnitPlatform() | ||
| } | ||
|
|
||
| shadowJar { | ||
| archiveFileName.set("ParcelLockers v${project.version}.jar") | ||
|
|
||
| exclude( | ||
| "org/intellij/lang/annotations/**", | ||
| "org/jetbrains/annotations/**", | ||
| "META-INF/**" | ||
| ) | ||
|
|
||
| mergeServiceFiles() | ||
|
|
||
| val relocationPrefix = "com.eternalcode.parcellockers.libs" | ||
|
|
||
| listOf( | ||
| "org.bstats" | ||
| ).forEach { relocate(it, "$relocationPrefix.$it") } | ||
| } | ||
| } | ||
|
|
||
| fun getVersionType(version: String): String { | ||
| return when { | ||
| version.contains("SNAPSHOT") -> "beta" | ||
| version.contains("alpha", true) -> "alpha" | ||
| version.contains("beta", true) -> "beta" | ||
| else -> "release" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this considered a legacy way of loading plugins?