A easy-to-use gradle plugin that enables more ergonomic modding of hytale mods.
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| gradle | ||
| src/main/java/agency/bithero/hytale/hybuild | ||
| .gitattributes | ||
| .gitignore | ||
| build.gradle | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| readme.md | ||
| settings.gradle | ||
hybuild
A gradle build plugin for easy building of hytale plugins.
License
This project is licensed under AGPL-3.0-or-later. For more information, see the LICENSE file, or alternatively online under https://www.gnu.org/licenses/.
Usage
To use this plugin, make sure you have added https://maven.bithero.agency/ for your plugin management:
pluginManagement {
repositories {
maven { url 'https://maven.bithero.agency/' }
gradlePluginPortal()
}
}
Example on using it:
plugins {
id 'agency.bithero.hybuild' version '0.1.0'
}
hybuild {
runs {
server {
// You can add additional program args, like loading
// mods from an local folder (usefull for dependencies).
//
// Use `programArgs` for multiple argumens!
programArg "--mods=${file("libs")}"
// Changes the workingdirectory of the server:
runDir "my-server-run"
// It's also suported to change JVM arguments:
vmArg "-Dsome=value"
// However for properties in particular, there is also
property("some", "name")
// Ofcourse both have multi-variants with `vmArgs` and
// `properties` respectively!
}
}
// By default, hybuild uses the 'release' patchline,
// aswell as the 'latest' build; if you need this changed,
// you can overwrite it:
patchline 'pre-release'
build 'build-1'
}
dependencies {
// This includes the hytale server API in your mod:
implementation hybuild.serverApi
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(25)
}
tasks.register('showPaths') {
doLast {
// Using `hybuild` as an variable also allows you
// to retrieve all hytale paths you might want:
println "base dir: ${hybuild.baseDir}"
println "user data dir: ${hybuild.userDataDir}"
println "game dir: ${hybuild.gamebuildDir}"
println "assets zip: ${hybuild.assetsZip}"
println "server jar: ${hybuild.serverJar}"
}
}