-
Notifications
You must be signed in to change notification settings - Fork 0
IDE Source Attachment
The plugin can prepare decompiled sources for IDE use.
It decompiles:
- the Hytale server jar
- every dependency declared in
vineImplementation,vineCompileOnly, orvineDecompileTargets
Generated decompiled sources are packaged as -sources.jar files and installed into local generated repositories under:
build/generated-sources-m2/
build/generated-sources-ivy/The plugin installs both:
- the original binary jar
- the generated sources jar
IDEs use these for source attachment after generation.
Note: These generated repositories are not used for normal dependency resolution during the build. They exist only to support IDE source attachment after sources have been generated.
This avoids Gradle task dependency conflicts and ensures consistent builds.
If the idea plugin is applied, decompiled sources are prepared automatically when you run:
./gradlew ideaYou can also run it directly:
./gradlew prepareDecompiledSourcesForIdeDecompiled source jars are written under:
build/generated-sources-jars/
Use vineDecompileTargets for any dependency whose decompiled sources you want available in your IDE:
dependencies {
vineDecompileTargets 'com.buuz135:MultipleHUD:1.0.6'
}The Hytale server jar does not contain source-level Javadocs, so Vineflower cannot recover comments from bytecode by itself. To make API documentation visible while browsing generated sources, the plugin fetches the hosted Hytale Server API Javadocs and injects matching class, constructor, and method documentation into the generated server source jar.
By default, the Javadocs URL is selected from the configured patchline:
| Patchline | Default Javadocs URL |
|---|---|
release |
https://release.server.docs.hytale.com/ |
pre-release / prerelease
|
https://prerelease.server.docs.hytale.com/ |
You can override the URL or disable source injection:
hytaleTools {
// Optional override; normally computed from patchline
serverJavadocsUrl = 'https://release.server.docs.hytale.com/'
// Enabled by default
injectServerJavadocsIntoSources = true
}The injector caches downloaded pages and missing pages under Gradle user home:
~/.gradle/caches/hytale-javadocs/<patchline>/
The first run may take longer while pages are fetched. Later runs are faster because successful pages and missing-page lookups are cached. If hosted docs change, and you need a fresh injection pass, delete the relevant cache directory and rerun:
rm -rf ~/.gradle/caches/hytale-javadocs/release
./gradlew prepareDecompiledSourcesForIde --rerun-tasksThe plugin also adds the hosted Javadocs URL to Gradle javadoc tasks. If the idea plugin is applied, the generated IDEA metadata also receives the external Javadocs URL, but the plugin does not apply idea automatically.