This repo was created with the goal of making a build script general enough and feature-rich enough so that any Minecraft 1.12.2 mod could adapt to it and not only work without issues, but gain many new features as well as receive technical support and updates if any problems are encountered using Gradle.
This build script was heavily inspired by the build script created by GT New Horizons for 1.7.10 mods, which can be found here. Much of the credit goes to them, as this script shares many similarities to theirs.
javax
And many more to come! And of course, all of these features are toggleable via an option in gradle.properties
.
git init; git commit --message "initial commit"
gradle.properties
, package/class names for your src/main
directory, etc../gradlew setupDecompWorkspace
./gradlew updateBuildScript
to ensure that you are on the latest versionrunClient
run configuration or run ./gradlew runClient
to launch the gamebuild.gradle
file to build.gradle.old
build.gradle
, dependencies.gradle
, and repositories.gradle
files from this zip to your projectsettings.gradle
file from this zip to your project and replace your current onegradle.properties
file to your gradle.properties
(or copy entirely if you did not have one). You can leave your existing options if you know you need them, otherwise they can likely be removedgradle.properties
for your moddependencies
and/or repositories
from build.gradle.old
to the respective files (dependencies.gradle
, repositories.gradle
)
includeWellKnownRepositories
option in gradle.properties
, this build script will automatically have the following Maven locations, meaning you don't need to add them yourself in repositories.gradle
:
includeCommonDevEnvMods
option in gradle.properties
, this build script will automatically have the following Mods, meaning you don't need to add them yourself in dependencies.gradle
:
build.gradle.old
file./gradlew updateBuildScript
to ensure that you are on the latest versionmixins.{modid}.json
, if yours was not named this way. Currently, you will have to move your Mixin config options to this newly generated file. If this behavior does not suit your needs, feel free to open an issue and start a discussion on different behaviorgradle.properties
file's comments to view the environment variable names this script checks foraddon.gradle
file and put it thererepositories.gradle
and dependencies.gradle
files, they are optionalbuild.gradle
: This file is automatically updated, and as a result should not be modified by the user directlygradle.properties
: Contains all the user configuration for the build scriptsettings.gradle
: This file contains some basic setup of the build script. It is currently not versioned, so it is safe to add to, though should not have things removed from it
Any of these files can optionally be either .gradle
(Groovy), or .gradle.kts
(Kotlin DSL).
dependencies.gradle[.kts]
: Add your mod's dependencies here. This is separate from the main build script so that you can replace build.gradle
if an update is availablerepositories.gradle[.kts]
: Add your dependencies' repositories here. Many common ones are already handled by build.gradle
addon.gradle[.kts]
: An optional file, which can be used if you have any more advanced gradle commands. However, we are open to new features, so let us know if there is something you want that we could add to this build script to avoid needing this file!./gradlew updateBuildScript
./gradlew faq
./gradlew generateAssets