Improve Gradle Practices#3
Merged
sisby-folk merged 28 commits intoModFest:fabric-26.1from Apr 7, 2026
Merged
Conversation
gradle can import it automatically, and it's good to follow the standard
this is *long* gone. removed in loom 1.8
- parallel: enable parallel mode. should be on by default IMO. - caching: enable the build cache (https://docs.gradle.org/current/userguide/build_cache.html) - configuration-cache: enable the config cache (https://docs.gradle.org/current/userguide/configuration_cache.html) - configuration-cache.parallel: enable additional parallelization of the config cache (https://docs.gradle.org/current/userguide/configuration_cache_enabling.html#config_cache:usage:parallel) - configureondemand: avoids configuring projects that aren't needed for a build (https://docs.gradle.org/current/userguide/configuration_on_demand.html) - warning.mode: enabled all warnings, to catch problems before they become errors These flags are pretty stable, but may cause issues with some use cases. For a simple mod project, they should all work fine and provide significant performance boosts. It's possible to also enable isolated projects, but that is known to not be fully compatible with loom yet. It's also still incubating, and labeled as unsafe. (https://docs.gradle.org/current/userguide/isolated_projects.html)
this is required for configuration cache support
better IDE support, official best practice. https://docs.gradle.org/current/userguide/best_practices_general.html#use_kotlin_dsl
setting the root project name is preferred
as far as I know there's no reason to do this
no clue why this is here
this is more accurate to gradle's internal model, and allows a project to be scaled into a multiproject build more easily. this is an official gradle best practice: https://docs.gradle.org/current/userguide/best_practices_dependencies.html#set_up_repositories_in_settings
it's expected that fabric loader and API are part of a mod's API surface
mod-publish-plugin is a much more modern method of publishing mods. it's config-cache compatible, and supports a lot more than just modrinth.
- publish and attest sources jars too - run correct task to publish to modrinth
lets you run the workflow manually
it's not always making a release
Contributor
|
looks good - out of curiosity, why move the libs.versions.toml back to gradle/? outside it being the default, I always thought it was easier to work with and easier to recognize when it's in root. |
Member
Author
|
I think it being the default is a pretty good reason. It's where others may expect it to be, and it doesn't teach people to assume something non-default. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Did a bunch of stuff, reasons for everything are in commit descriptions.
Oddities: