-
Notifications
You must be signed in to change notification settings - Fork 0
Included Tasks
Creates src/main/resources/manifest.json with a default structure if it does not already exist.
This task is safe to run repeatedly and will not overwrite an existing manifest.
Updates (or rewrites) src/main/resources/manifest.json from Gradle configuration.
Resolves the Hytale Assets.zip used by local development.
By default, this task authenticates with Hytale device auth, downloads the asset wrapper,
extracts Assets.zip, and caches the extracted zip under Gradle user home.
If hytaleHomeOverride is configured, the plugin resolves an existing local Assets.zip
from that path and uses it directly. In this mode, the assets zip is not copied into the
Gradle cache.
You can point hytaleHomeOverride at either:
- a direct
Assets.zipfile - a directory containing
Assets.zip - a Hytale launcher/install directory that contains the configured patchline assets
hytaleTools {
hytaleHomeOverride = "/path/to/Hytale/install/release/package/game/latest/Assets.zip"
}or
hytaleTools {
hytaleHomeOverride = "/path/to/Hytale/install/release/package/game/latest/"
}If no override is configured and remote download fails, the task attempts to locate a local
Hytale installation as a fallback and caches the found Assets.zip.
Launches a local Hytale server using:
- your project output
- your runtime classpath
- the resolved Hytale server jar
You can customize the server launch arguments, JVM arguments, debug mode, and hot swap behavior through the extension:
hytaleTools {
hytaleVersion = '0.+'
serverArgs = [
'--allow-op',
'--disable-sentry',
'--disable-file-watcher'
]
serverJvmArgs = [
'-Xms1G',
'-Xmx2G'
]
preRunTask = 'generateDevResources'
// Optional debug / hot swap support
debugEnabled = false
debugPort = 5005
debugSuspend = false
hotSwapEnabled = false
requireDcevm = false
useHotswapAgent = true
// Optional external HotswapAgent jar.
// If unset, the plugin will try bundled JBR HotswapAgent support when available.
hotswapAgentPath = ''
// Optional explicit JetBrains Runtime location
// jbrHome = '/path/to/jbr'
}
tasks.register('generateDevResources') {
doLast {
println 'Preparing additional dev resources...'
}
}You can also enable debug and hot swap from the command line:
./gradlew runServer -Ddebug=true
./gradlew runServer -Ddebug=true -Dhotswap=trueHot swap support depends on the selected JVM:
- Standard JVM: limited to method body changes
- JetBrains Runtime (JBR): supports enhanced class redefinition
- HotswapAgent (if available): improves runtime reload behavior
When hotSwapEnabled is true, the plugin checks the selected JVM for enhanced class redefinition support. If enhanced redefinition is available, it adds -XX:+AllowEnhancedClassRedefinition. If useHotswapAgent is also true, the plugin either uses the configured external hotswapAgentPath jar or falls back to bundled JBR HotswapAgent support when available.
For best results, use JetBrains Runtime with hot swap enabled.
Notes:
-
serverArgsare appended to the default--assets=...argument automatically added by the plugin -
serverJvmArgsare added in addition to the plugin’s default JVM launch settings -
preRunTasklets you run a custom preparation task beforerunServer -
debugEnabledenables JDWP debugging for IDE attach -
hotSwapEnabledenables runtime probing for enhanced class redefinition support -
requireDcevmfails early if enhanced class redefinition is not available -
useHotswapAgentenables HotswapAgent integration when hot swap is enabled -
hotswapAgentPathpoints to an external HotswapAgent jar; when set, it is used as-javaagent:<path>=autoHotswap=true - If
hotswapAgentPathis empty, the plugin attempts to use bundled JBR HotswapAgent support when available -
jbrHomecan be used to point the plugin at a specific JetBrains Runtime installation
Prints JVM diagnostics relevant to debugging and hot swap, including:
- resolved Java executable
- JetBrains Runtime detection
- enhanced class redefinition support
- HotswapAgent mode support
- bundled HotswapAgent availability
This is useful when validating a local JetBrains Runtime setup before using hot swap.
Runtime resolution uses jbrHome first, then known JetBrains Runtime environment variables (JBR_HOME, etc.), and finally falls back to the current JVM.
The plugin can automatically detect JetBrains Runtime installations from common locations, including JetBrains Toolbox installs, when jbrHome is not explicitly configured.