Skip to content

xyz.unifycraft.gradle.tools

Deftu edited this page Jul 2, 2022 · 6 revisions

About

This plugin applies various utilities to your Gradle project. This applies all plugins bundled inside the toolkit that include utilities which may fit your needs, aside from the multi-version utilities. These plugins will be automatically configured to suit your needs by default.

Usage

This plugin will do everything for you automatically. You need to be using Java 17 and at least Gradle 7 for this plugin to work, as such it will throw an error if both of those requirements are not met.

GitHub data will automatically be collected and added to your project as a Gradle extension. This data can be used with githubData. You can read more about this here.

The xyz.unifycraft.gradle.tools.configure and xyz.unifycraft.gradle.tools.repo plugins will automatically be applied, and have their own optional functionality which can be configured via your gradle.properties. You can read more about them on their respective wiki pages.

If you're using the Gradle java plugin (10/10 times you will be) then we will automatically configure said plugin and your project's resource processing. You can find out more about these plugin's configurations on their respective wiki pages.

If you're using the Kotlin Gradle plugin, we will automatically configure it to work with your current Java version.

If you're using Kyori's Blossom plugin, we will automatically configure it to replace strings in your source code when building with your mod's metadata. To learn about what strings will be replaced, click here.

If you're using Gradle's maven-publish plugin, we will automatically set up publishing which is compatible with our tool suite and Architectury Loom. This will also set up publishing to our own Maven repository if you have credentials for it.

If you're using Architectury Loom, specifically Essential's fork of it, we will automatically configure everything for you. The Minecraft, mod loader and mappings dependencies will all be set up for you.

Extension

The base plugin will also create a unifycraft extension, which for the most part just configures your dependencies for you. If you'd like to use the Essential API, it provides a useEssential method which will automatically add the latest API version to your project as a dependency and set up the Essential launchwrapper. It also has utility methods to set up DJtheRedstoner's DevAuth mod for your development environment.