Skip to content

Commit

Permalink
Update to 1.21 (#69)
Browse files Browse the repository at this point in the history
* prep for 1.21

* bump nbt api

* bump version

* only publish to modrinth if it contains a specific word

* update buildscript

* chore: update .gitignore etc

* chore: parity with other buildscripts

* update README.md

* chore: update jenkins version output
  • Loading branch information
ryderbelserion authored Jun 20, 2024
1 parent 9c78768 commit 0d449e2
Show file tree
Hide file tree
Showing 18 changed files with 105 additions and 132 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
if: "!contains(github.event.commits[0].message, '[ci-skip]')"
if: "contains(github.event.commits[0].message, '[build]')"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down
26 changes: 15 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
.idea
.gradle
.idea
build
jars

buildSrc/build
buildSrc/.gradle
buildSrc/build

common/build
common/.gradle
core/.gradle
core/build

api/.gradle
api/build

paper/build
paper/.gradle
paper/build

paper/run
paper/run/

!paper/run/config
!paper/run/spigot.yml
!paper/run/config/paper-global.yml
!paper/run/config/paper-world-defaults.yml
!paper/run/bukkit.yml
!paper/run/eula.txt
!paper/run/ops.json
!paper/run/server.properties
!paper/run/plugins
!paper/run/ops.json
!paper/run/spigot.yml

jars
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ Send any console errors or files you have through https://mclo.gs/ - (We don't o

<!--[![Discord](https://discord.com/api/guilds/182615261403283459/widget.png?style=banner2)](https://discord.gg/badbones-s-live-chat-182615261403283459)<br>-->
[![Discord Invite Button](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/social/discord-plural_vector.svg)](https://discord.gg/badbones-s-live-chat-182615261403283459)
</div></center>
</div>

![CrazyVouchers Statistics](https://bstats.org/signatures/bukkit/Vouchers.svg)
</center>


[contributors-shield]: https://img.shields.io/github/contributors/Crazy-Crew/CrazyVouchers.svg?style=flat&logo=appveyor
[contributors-url]: https://github.com/Crazy-Crew/CrazyVouchers/graphs/contributors
Expand Down
24 changes: 15 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
import com.ryderbelserion.feather.tools.formatLog
import com.ryderbelserion.feather.tools.latestCommitHash
import com.ryderbelserion.feather.tools.latestCommitMessage

plugins {
alias(libs.plugins.minotaur)
alias(libs.plugins.hangar)

`java-plugin`
}

val isSnapshot = false
val buildNumber: String? = System.getenv("BUILD_NUMBER")

rootProject.version = "3.5.6"
rootProject.version = if (buildNumber != null) "${libs.versions.minecraft.get()}-$buildNumber" else "3.6"

val content: String = rootProject.file("CHANGELOG.md").readText(Charsets.UTF_8)
val isSnapshot = false

val content: String = if (isSnapshot) {
formatLog(latestCommitHash(), latestCommitMessage(), rootProject.name, "Crazy-Crew")
} else {
rootProject.file("CHANGELOG.md").readText(Charsets.UTF_8)
}

subprojects.filter { it.name != "api" }.forEach {
it.project.version = rootProject.version
Expand All @@ -33,9 +43,7 @@ modrinth {

gameVersions.add(libs.versions.minecraft.get())

loaders.addAll(listOf(
"purpur", "paper", "folia"
))
loaders.addAll(listOf("purpur", "paper", "folia"))

autoAddDependsOn.set(false)
detectLoaders.set(false)
Expand All @@ -57,9 +65,7 @@ hangarPublish {
paper {
jar.set(rootProject.projectDir.resolve("jars/${rootProject.name}-${rootProject.version}.jar"))

platformVersions.set(listOf(
libs.versions.minecraft.get()
))
platformVersions.set(listOf(libs.versions.minecraft.get()))

dependencies {
hangar("PlaceholderAPI") {
Expand Down
2 changes: 0 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@ plugins {
}

dependencies {
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))

feather("0.0.1")
}
8 changes: 0 additions & 8 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import com.ryderbelserion.feather.libs

rootProject.name = "buildSrc"

dependencyResolutionManagement {
Expand All @@ -10,12 +8,6 @@ dependencyResolutionManagement {

mavenCentral()
}

versionCatalogs {
register("libs") {
from(files(libs))
}
}
}

pluginManagement {
Expand Down
31 changes: 10 additions & 21 deletions buildSrc/src/main/kotlin/java-plugin.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import com.ryderbelserion.feather.enums.Repository
import org.gradle.accessors.dm.LibrariesForLibs

val libs = the<LibrariesForLibs>()

plugins {
id("com.ryderbelserion.feather-core")
Expand All @@ -12,15 +9,21 @@ plugins {
}

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

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

maven("https://repo.oraxen.com/releases")

maven(Repository.CrazyCrewReleases.url)

maven(Repository.Jitpack.url)

flatDir { dirs("libs") }

mavenCentral()
}

dependencies {
compileOnlyApi(libs.annotations)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
Expand All @@ -40,18 +43,4 @@ tasks {
processResources {
filteringCharset = Charsets.UTF_8.name()
}
}

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

repository(Repository.CrazyCrewReleases.url)

repository(Repository.Jitpack.url)

/*configureJava {
javaSource(JvmVendorSpec.ADOPTIUM)
javaVersion(21)
}*/
}
13 changes: 4 additions & 9 deletions buildSrc/src/main/kotlin/paper-plugin.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import com.ryderbelserion.feather.enums.Repository
import org.gradle.accessors.dm.LibrariesForLibs

val libs = the<LibrariesForLibs>()

plugins {
id("java-plugin")
}

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

repository("https://repo.triumphteam.dev/snapshots")
repositories {
maven("https://repo.triumphteam.dev/snapshots")

repository("https://maven.enginehub.org/repo")
maven("https://maven.enginehub.org/repo")

repository(Repository.Paper.url)
maven(Repository.Paper.url)
}
6 changes: 4 additions & 2 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
plugins {
`java-plugin`
`paper-plugin`
}

dependencies {
compileOnly(libs.vital.core)
compileOnly(libs.paper)

api(libs.vital.paper)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ public class ConfigMigration extends PlainMigrationService {

@Override
protected boolean performMigrations(@NotNull PropertyReader reader, @NotNull ConfigurationData configurationData) {
return migrateLocale(reader, configurationData);
}

private boolean migrateLocale(@NotNull PropertyReader reader, @NotNull ConfigurationData configurationData) {
return FileProperty.command_prefix.moveString(reader, configurationData)
| FileProperty.must_be_in_survival.moveBoolean(reader, configurationData)
| FileProperty.prevent_using_vouchers_in_recipes_toggle.moveBoolean(reader, configurationData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ public class LocaleMigration extends PlainMigrationService {

@Override
protected boolean performMigrations(@NotNull PropertyReader reader, @NotNull ConfigurationData configurationData) {
return migrateConfig(reader, configurationData);
}

private boolean migrateConfig(@NotNull PropertyReader reader, @NotNull ConfigurationData configurationData) {
return FileProperty.survival_mode.moveString(reader, configurationData)
| FileProperty.no_permission.moveString(reader, configurationData)
| FileProperty.no_permission_to_use_voucher_in_offhand.moveString(reader, configurationData)
Expand Down
18 changes: 9 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
org.gradle.parallel=false
org.gradle.jvmargs = -Xmx3G
org.gradle.daemon = false
org.gradle.parallel = false

group=com.badbones69.crazyvouchers
authors=["ryderbelserion", "BadBones69", "TDL"]
description=Give your players as many rewards as you like in a compact form called a CrazyVoucher
website=https://modrinth.com/plugin/crazyvouchers
sources=https://github.com/Crazy-Crew/CrazyVouchers
issues=https://github.com/Crazy-Crew/CrazyVouchers/issues
group = com.badbones69.crazyvouchers
authors = ["ryderbelserion", "BadBones69", "TDL"]
description = Give your players as many rewards as you like in a compact form called a CrazyVoucher
website = https://modrinth.com/plugin/crazyvouchers
sources = https://github.com/Crazy-Crew/CrazyVouchers
issues = https://github.com/Crazy-Crew/CrazyVouchers/issues
56 changes: 28 additions & 28 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
[versions]
# Minecraft
paper = "1.20.6-R0.1-SNAPSHOT"
minecraft = "1.20.6"
paper = "1.21-R0.1-SNAPSHOT"
minecraft = "1.21"

# Libraries
triumph-cmd = "2.0.0-ALPHA-10"
tirumph-gui = "3.1.7"
jetbrains = "24.1.0"
kyori = "4.17.0"
vital = "1.5.9"

# Plugins
itemsadder = "3.6.3-beta-14"
headdatabaseapi = "1.3.1"
placeholderapi = "2.11.6"
oraxen = "1.171.0"

# Core
annotations = "24.1.0"
crazycrates = "0.6"
gson = "2.10.1"
vital = "1.4"

decentholograms = "2.8.8"
fancyholograms = "2.0.6"

triumph-cmd = "2.0.0-ALPHA-10"
tirumph-gui = "3.1.7"

fancyholograms = "2.2.0"
worldguard = "7.0.10"
oraxen = "1.171.0"
nbtapi = "2.13.0"
vault = "1.7.1"

# Paper
paperweight="1.7.1"
shadowJar = "8.1.7"
runPaper = "2.3.0"
minotaur = "2.+"
hangar = "0.1.2"

nbtapi = "2.12.4"
# Other
shadowJar = "8.1.7"

# Modrinth
minotaur = "2.+"

[plugins]
paperweight = { id = "io.papermc.paperweight.userdev", version.ref = "paperweight" }
Expand All @@ -43,36 +44,35 @@ minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" }
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
paper = { module = "io.papermc.paper:paper-api", version.ref = "paper" }

# Paper
kyori = { module = "net.kyori:adventure-api", version.ref = "kyori" }

# Plugins
decent-holograms = { module = "com.github.decentsoftware-eu:decentholograms", version.ref = "decentholograms" }
fancy-holograms = { module = "de.oliver:FancyHolograms", version.ref = "fancyholograms" }

headdatabaseapi = { module = "com.arcaniax:HeadDatabase-API", version.ref = "headdatabaseapi" }
placeholderapi = { module = "me.clip:placeholderapi", version.ref = "placeholderapi" }

worldguard = { module = "com.sk89q.worldguard:worldguard-bukkit", version.ref = "worldguard" }

nbtapi = { module = "de.tr7zw:item-nbt-api", version.ref = "nbtapi" }
vault = { module = "com.github.MilkBowl:VaultAPI", version.ref = "vault" }

itemsadder = { module = "com.github.LoneDev6:api-itemsadder", version.ref = "itemsadder" }
oraxen = { module = "io.th0rgal:oraxen", version.ref = "oraxen" }

worldguard = { module = "com.sk89q.worldguard:worldguard-bukkit", version.ref = "worldguard" }

nbtapi = { module = "de.tr7zw:item-nbt-api", version.ref = "nbtapi" }

# Libraries
triumph-cmds = { module = "dev.triumphteam:triumph-cmd-bukkit", version.ref = "triumph-cmd" }
triumph-gui = { module = "dev.triumphteam:triumph-gui", version.ref = "tirumph-gui" }

crazycrates = { module = "us.crazycrew.crazycrates:api", version.ref = "crazycrates" }

annotations = { module = "org.jetbrains:annotations", version.ref = "annotations" }
jetbrains = { module = "org.jetbrains:annotations", version.ref = "jetbrains" }

vital-paper = { module = "com.ryderbelserion.vital:paper", version.ref = "vital" }
vital-core = { module = "com.ryderbelserion.vital:core", version.ref = "vital" }

gson = { module = "com.google.code.gson:gson", version.ref = "gson" }

[bundles]
holograms = ["decent-holograms", "fancy-holograms"]

triumph = ["triumph-cmds", "triumph-gui"]

items = ["itemsadder", "oraxen"]
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion 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/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/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 Down
Loading

0 comments on commit 0d449e2

Please sign in to comment.