A simple Gradle plugin ecosystem used to manage your Gradle projects — Automatically setting up project metadata, configuring your plugins, configuring your language compilers.
For the most basic use, DGT has dev.deftu.gradle.tools, which will automatically set up your project metadata and repositories, as well as configuring the Java and Kotlin compilers if their respective plugins are present.
The dev.deftu.gradle.tools.resources plugin will automatically configure the processResources extension in your project, replacing tokens for project metadata, Minecraft metadata and mod metadata.
- project_name
- project_version
- project_description
- project_group
- mod_id
- mod_name
- mod_version
- mod_description
- mod_group
- file.jarVersion(For Forge)
- forge_loader_version(For Forge)
- mc_version
- minor_mc_version
- format_mc_version
- java_version
The dev.deftu.gradle.tools.shadow plugin will automatically configure the Shadow plugin in your project, adding a fatJar task which is automatically configured to work with Fabric/Architectury Loom (whereas, normal Shadow tasks don't).
Using it is as simple as applying the plugin to your project and using the shade configuration for your dependencies. Be aware that shade does not configure the dependency for use in your project, it simply tells Shadow to include it in the JAR.
The dev.deftu.gradle.tools.dokka plugin will automatically put your Dokka documentation inside of your Javadoc JAR, and requires nothing more than being applied to your project.
The dev.deftu.gradle.tools.publishing.github plugin will automatically configure your project to publish to GitHub releases, and has maximal configuration options. It's easiest to check the GitHubPublishingExtension class for all the properties.
The dev.deftu.gradle.tools.publishing.maven plugin will automatically configure your project to publish to a Maven repository, and has maximal configuration options. It's easiest to check the MavenPublishingExtension class for all the properties.
The dev.deftu.gradle.tools.minecraft.api plugin will add a toolkitLoomApi extension to your project, which allows you to set up a test mod environment for libraries.
The dev.deftu.gradle.tools.minecraft.loom plugin will automatically configure the Loom plugin in your project, setting up the versioning of all required dependencies for the given Minecraft version and mod loader your project uses.
You can configure it to not set up certain aspects of your project with the following properties:
- dgt.loom.minecraft.setup
- dgt.loom.mappings.use
- dgt.loom.loader.use
An entirely different minecraft dependency can be configured with dgt.loom.minecraft.
It is also possible to pick from several options for your mappings using dgt.loom.mappings. The default is to use the recommended mappings set for your version and loader (f.ex, Yarn for Fabric, official for Forge 1.16+, etc). The possible options are:
- official/- mojang/- mojmapfor official mappings
- official-liketo use the most similar mappings to the official ones (MCP for legacy Forge/Fabric, official for 1.16+)
- Alternatively you can outright provide your own dependency notation.
There are also mapping flavors which you can choose from using dgt.loom.mappings.flavor. At the moment, the only supported flavor is parchment, which is available for official mappings. When used, the parchment flavor will only apply to Minecraft versions which support official mappings (1.16.5+).
You can get versions (or full dependency notations) for multiple different loader-specific common dependencies via mcData#dependencies.
The return values of all of the properties inside of the MCDependency objects are configurable via several properties:
- dgt.fabric.loader.version
- dgt.fabric.yarn.version(also works for Legacy Fabric!)
- dgt.fabric.api.version(also works for Legacy Fabric!)
- dgt.fabric.language.kotlin.version
- dgt.fabric.modmenu.version
- dgt.forge.version
- dgt.forge.mcp.dependency
- dgt.neoforge.version
The dev.deftu.gradle.tools.minecraft.releases plugin will automatically configure your project to publish to both CurseForge and Modrinth, and has maximal configuration options. It's easiest to check the ReleasingExtension class for all the properties.
- Publishing for Modrinth can be setup via configuring the dgt.publish.modrinth.tokenproperty in your global Gradle properties file and setting your project ID viamodrinth.projectIdintoolkitReleases
- Publishing for CurseForge can be setup via configuring the dgt.publish.curseforge.apikeyproperty in your global Gradle properties file and setting your project ID viacurseforge.projectIdintoolkitReleases
By default, for Windows users, they will be located at C:\Users\YOU\.gradle\gradle.properties. But, this can be configured using the GRADLE_HOME environment variable, so if setting these properties in the default location does not work, check if you have the environment variable set up.
This project is licensed under LGPL-3.0.
© 2024 Deftu