Skip to content

Commit

Permalink
update buildscript
Browse files Browse the repository at this point in the history
  • Loading branch information
ryderbelserion committed Sep 3, 2024
1 parent 5198b17 commit fbd2b5d
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 114 deletions.
10 changes: 1 addition & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
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)
Expand All @@ -15,11 +11,7 @@ rootProject.version = if (buildNumber != null) "${libs.versions.minecraft.get()}

val isSnapshot = false

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

subprojects.filter { it.name != "api" }.forEach {
it.project.version = rootProject.version
Expand Down
8 changes: 0 additions & 8 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
import com.ryderbelserion.feather.feather

plugins {
id("com.ryderbelserion.feather-logic") version "0.0.1"

`kotlin-dsl`
}

dependencies {
feather("0.0.1")
}
16 changes: 0 additions & 16 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,6 @@ rootProject.name = "buildSrc"

dependencyResolutionManagement {
repositories {
maven("https://repo.crazycrew.us/releases")

gradlePluginPortal()

mavenCentral()
}
}

pluginManagement {
repositories {
maven("https://repo.crazycrew.us/releases")

gradlePluginPortal()
}
}

plugins {
id("com.ryderbelserion.feather-settings")
}
12 changes: 3 additions & 9 deletions buildSrc/src/main/kotlin/java-plugin.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import com.ryderbelserion.feather.enums.Repository

plugins {
id("com.ryderbelserion.feather-core")

`maven-publish`

`java-library`
Expand All @@ -13,13 +9,11 @@ repositories {

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

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

maven(Repository.CrazyCrewReleases.url)

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

flatDir { dirs("libs") }
maven("https://jitpack.io")

mavenCentral()
}
Expand Down
6 changes: 1 addition & 5 deletions buildSrc/src/main/kotlin/paper-plugin.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import com.ryderbelserion.feather.enums.Repository

plugins {
id("java-plugin")
}

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

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

maven(Repository.Paper.url)
}
63 changes: 27 additions & 36 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
[plugins]
paperweight = { id = "io.papermc.paperweight.userdev", version.ref = "paperweight" }
hangar = { id = "io.papermc.hangar-publish-plugin", version.ref = "hangar" }
runPaper = { id = "xyz.jpenilla.run-paper", version.ref = "runPaper" }
minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" }
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }

[versions]
# Minecraft
paper = "1.21-R0.1-SNAPSHOT"
minecraft = "1.21"
# Paper API
paper = "1.21.1-R0.1-SNAPSHOT"
velocity = "3.3.0-SNAPSHOT"

# Gradle Plugins
paperweight = "1.7.2"
runPaper = "2.3.0"
minotaur = "2.+"
hangar = "0.1.2"
shadow = "8.3.0"

# Plugins
itemsadder = "3.6.3-beta-14"
Expand All @@ -14,59 +28,36 @@ vault = "1.7.1"

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

# Paper
paperweight="1.7.1"
runPaper = "2.3.0"
hangar = "0.1.2"

# Other
shadowJar = "8.1.7"
adventure = "4.17.0"
vital = "2.7.4"

# Modrinth
minotaur = "2.+"

[plugins]
paperweight = { id = "io.papermc.paperweight.userdev", version.ref = "paperweight" }
hangar = { id = "io.papermc.hangar-publish-plugin", version.ref = "hangar" }
shadowJar = { id = "io.github.goooler.shadow", version.ref = "shadowJar" }
runPaper = { id = "xyz.jpenilla.run-paper", version.ref = "runPaper" }
minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" }

[libraries]
# Servers
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
velocity = { module = "com.velocitypowered:velocity-api", version.ref = "velocity" }
paper = { module = "io.papermc.paper:paper-api", version.ref = "paper" }

# Paper
kyori = { module = "net.kyori:adventure-api", version.ref = "kyori" }
# Kyori
kyori-logger = { module = "net.kyori:adventure-text-logger-slf4j", version.ref = "adventure" }
kyori-text = { module = "net.kyori:adventure-text-minimessage", version.ref = "adventure" }
kyori-api = { module = "net.kyori:adventure-api", version.ref = "adventure" }

# Plugins
# Bukkit 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" }

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" }

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

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

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

[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.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,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 Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# 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
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
22 changes: 12 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
2 changes: 1 addition & 1 deletion paper/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
alias(libs.plugins.paperweight)
alias(libs.plugins.shadowJar)
alias(libs.plugins.runPaper)
alias(libs.plugins.shadow)

`paper-plugin`
}
Expand Down
18 changes: 1 addition & 17 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
import com.ryderbelserion.feather.includeProject

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

rootProject.name = "BlockParticles"

pluginManagement {
repositories {
maven("https://repo.crazycrew.us/releases")

gradlePluginPortal()
}
}

plugins {
id("com.ryderbelserion.feather-settings") version "0.0.1"
}

listOf("paper").forEach(::includeProject)
include("paper")

0 comments on commit fbd2b5d

Please sign in to comment.