Skip to content

Commit

Permalink
Update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
ryderbelserion committed Jan 17, 2025
1 parent 05d2bf5 commit 20d548b
Show file tree
Hide file tree
Showing 132 changed files with 841 additions and 819 deletions.
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/bugs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ body:
- "1.20.6"
- "1.21"
- "1.21.1"
- "1.21.3"
- "1.21.4"
validations:
required: true
- type: dropdown
id: platform
attributes:
label: Server Platform
description: What server platform are you using? Spigot is no longer supported. Please update to https://papermc.io
description: What server platform are you using? Spigot is no longer supported with Paper's hard-fork.
options:
- Spigot
- Paper
Expand Down Expand Up @@ -111,4 +113,4 @@ body:
- label: I ticked all the boxes without actually reading them
required: false
- label: My version of Minecraft is supported by CrazyCrew.
required: true
required: true
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
CrazyCrates is a crates plugin for Paper based servers that lets you add unlimited crates. It allows you to bring something to the server to spice up your economy and to give your players something to brag about.

## Building
CrazyCrates requires gradle 8.11.1 to build the plugin.
CrazyCrates requires gradle 8.12 to build the plugin.

### Requirements
* Java 21 JDK or newer
Expand All @@ -42,8 +42,8 @@ If you have made any changes or improvements which you think could be beneficial

#### Project Structure
The project has been separated into multiple modules for preemptively supporting other platforms.
* API Module - This module is the API used by other plugins that wish to properly integrate with our plugin, and receive data from CrazyCrates for use in their own plugins. No implementation details are in this module.
* Common Module - This module handles a small portion of the implementation for CrazyCrates, mainly the configuration files. and independent enums or utilities.
* Api Module - This module is the API used by other plugins that wish to properly integrate with our plugin, and receive data from CrazyCrates for use in their own plugins. No implementation details are in this module.
* Core Module - This module handles a small portion of the implementation for CrazyCrates, mainly the configuration files. and independent enums or utilities.
* The module does not yet handle implementation details for each platform.
* Paper Module - This module currently is what provides the implementation for the `API Module`, I have not written an exact abstract module to sit between, and reduce more duplicated code between platforms.
* Pull Requests that attempt to implement the remaining work of an abstract layer for multi-platform support will likely be ignored, I would like to handle that when the time comes.
Expand All @@ -66,4 +66,4 @@ CrazyCrates is a proud user of the MIT license, You can take a little peak at [L
[discord-shield]: https://img.shields.io/discord/182615261403283459.svg?label=discord&logo=discord
[discord-url]: https://discord.gg/badbones-s-live-chat-182615261403283459
[codefactor-shield]: https://www.codefactor.io/repository/github/crazy-crew/crazycrates/badge
[codefactor-url]: https://www.codefactor.io/repository/github/crazy-crew/crazycrates
[codefactor-url]: https://www.codefactor.io/repository/github/crazy-crew/crazycrates
18 changes: 17 additions & 1 deletion api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
plugins {
id("crates.base")
id("root-plugin")

`maven-publish`
}

project.group = "us.crazycrew.crazycrates"
project.description = "The official API for CrazyCrates!"
project.version = "0.8"

dependencies {
compileOnly(libs.bundles.adventure)
}

publishing {
repositories {
maven {
url = uri("https://repo.crazycrew.us/releases/")

credentials {
this.username = System.getenv("gradle_username")
this.password = System.getenv("gradle_password")
}
}
}
}
10 changes: 4 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
plugins {
id("crates.base")
id("root-plugin")
}

val buildNumber: String? = System.getenv("BUILD_NUMBER")
rootProject.group = "com.badbones69.crazycrates"

rootProject.version = if (buildNumber != null) "${libs.versions.minecraft.get()}-$buildNumber" else "5.0.0"
val buildNumber: String? = System.getenv("BUILD_NUMBER")

subprojects.filter { it.name != "api" }.forEach {
it.project.version = rootProject.version
}
rootProject.version = if (buildNumber != null) "${libs.versions.minecraft.get()}-$buildNumber" else "4.5.0"
4 changes: 4 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
`kotlin-dsl`
}

dependencies {
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
}
8 changes: 4 additions & 4 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ dependencyResolutionManagement {
gradlePluginPortal()
mavenCentral()
}
}

pluginManagement {
repositories {
gradlePluginPortal()
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
59 changes: 0 additions & 59 deletions buildSrc/src/main/kotlin/crates.base.gradle.kts

This file was deleted.

3 changes: 0 additions & 3 deletions buildSrc/src/main/kotlin/crates.parent.gradle.kts

This file was deleted.

17 changes: 17 additions & 0 deletions buildSrc/src/main/kotlin/paper-plugin.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import org.gradle.accessors.dm.LibrariesForLibs

// Hack which exposes `libs` to this convention plugin
val libs = the<LibrariesForLibs>()


plugins {
id("root-plugin")
}

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

dependencies {
compileOnly(libs.paper)
}
41 changes: 41 additions & 0 deletions buildSrc/src/main/kotlin/root-plugin.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import org.gradle.accessors.dm.LibrariesForLibs

// Hack which exposes `libs` to this convention plugin
val libs = the<LibrariesForLibs>()

plugins {
`java-library`
}

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

maven("https://repo.crazycrew.us/libraries/")
maven("https://repo.crazycrew.us/releases/")

maven("https://jitpack.io/")

mavenCentral()
}

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))

withSourcesJar()
withJavadocJar()
}

tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(21)
}

javadoc {
options.encoding = Charsets.UTF_8.name()
}

processResources {
filteringCharset = Charsets.UTF_8.name()
}
}
15 changes: 5 additions & 10 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
- Added direct support for Nexo/ItemsAdder/Oraxen furniture.
- A new config option was added in the config.yml letting you choose which plugin to use.
- If you leave it blank, or as "None"... The plugin will pick whichever it finds first.
- If you find an issue with one of the other plugins, Set the option in the config.yml to `None` then restart your server.
- Updated misleading comment on Prize Commands.
- Added /cc as an alias.
- Updated /crates editor.
- The new format is /crates editor -c/--crate <crate_name> or -e/--exit (if you want to leave the mode), This will put you an editor mode for this specific crate.
- While in this mode, If you right-click a block, You will add a crate location. If you left-click a block, You will remove a crate location.
- You no longer need to shift click, or be in creative mode.
- `Flags` has been removed from being a configuration option for Prizes
- If you used `Flags`, as long as it's not empty. It will simply hide everything, but lore/displayname.
- `HideItemFlags: true/false` will now function, it will hide all, but lore/displayname.
- `hide-tool-tip:true/false` is now an option for the `Items` section in Prizes.
- Updated to 1.21.4
2 changes: 1 addition & 1 deletion CONTRIBUTING.md → contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Adding new methods is perfectly fine as it won't break current plugins depending
Under no circumstance is existing methods suppose to have a change to the variables in the methods. You can change anything inside the method.
* i.e. UUID cannot become Player in `getKeys`, You should create a new method and deprecate the old one.

If trying to expose internal hashmap's or arraylists using the API, Return an unmodifiable version of the map/arraylists
If trying to expose internal hashmap's or arraylists using the API, Return an unmodifiable version of the map/arraylists
5 changes: 3 additions & 2 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
plugins {
id("crates.base")
id("root-plugin")
}

dependencies {
compileOnly(libs.fusion.core)

compileOnly(libs.jetbrains)

api(projects.crazycratesApi)
api(project(":crazycrates-api"))

api(libs.jalu)
}
4 changes: 2 additions & 2 deletions examples/paper/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
plugins {
id("crates.base")
id("paper-plugin")

alias(libs.plugins.shadow)
}

dependencies {
implementation(projects.crazycratesApi)
implementation(project(":crazycrates-api"))

compileOnly(libs.paper)
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
website=https://github.com/Crazy-Crew/CrazyCrates
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bStats = "3.1.0"
jalu = "1.4.1"

# Kyori API
adventure = "4.17.0"
adventure = "4.18.0"

[bundles]
# Hologram API
Expand Down
12 changes: 7 additions & 5 deletions paper/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
plugins {
id("crates.base")
id("paper-plugin")

alias(libs.plugins.runPaper)
alias(libs.plugins.shadow)
}

project.group = "${rootProject.group}.paper"
project.version = rootProject.version
project.description = "Add crates to your Paper server with 11 different crate types to choose from!"

repositories {
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")

Expand All @@ -18,16 +22,14 @@ repositories {
}

dependencies {
implementation(projects.crazycratesCore)
implementation(project(":crazycrates-core"))

implementation(libs.triumph.cmds)

implementation(libs.fusion.paper)

implementation(libs.metrics)

compileOnly(libs.paper)

compileOnly(libs.bundles.dependencies)
compileOnly(libs.bundles.shared)
compileOnly(libs.bundles.crates)
Expand Down Expand Up @@ -63,7 +65,7 @@ tasks {
inputs.properties("group" to project.group)
inputs.properties("apiVersion" to libs.versions.minecraft.get())
inputs.properties("description" to project.description)
inputs.properties("website" to "https://modrinth.com/plugin/crazycrates")
inputs.properties("website" to rootProject.properties["website"].toString())

filesMatching("paper-plugin.yml") {
expand(inputs.properties)
Expand Down
Loading

0 comments on commit 20d548b

Please sign in to comment.