Skip to content

Clean up and update Gradle setup#1

Merged
KiriCattus merged 10 commits into
kiris-mods:devfrom
lukebemish:dev
Oct 6, 2025
Merged

Clean up and update Gradle setup#1
KiriCattus merged 10 commits into
kiris-mods:devfrom
lukebemish:dev

Conversation

@lukebemish
Copy link
Copy Markdown
Contributor

Some general cleanups and updates to the Gradle setup:

  • Make gradlew executable (with chmod +x gradlew). This is necessary for using the template from the CLI in a unix-like environment.
  • Stop disabling the daemon. There is no reason to disable the daemon nowadays (FG used to break it back in the day) and it's useful to make invoking gradle a bit faster.
  • Enable configuration cache, and make necessary cleanups for configuration cache compatibility.
  • General consistency: tabs/spaces fixed, use the normal gitattributes treatment with LF in gradle files, use version ranges derived from the version you build against more broadly, and the like
  • Update gradle plugins, and move the few straggling version declarations to gradle.properties
  • Migrate buildSrc to a build-logic included build -- as Gradle recommends.
  • Change project names and remove explicit artifactId and archivesName declarations. By setting the project names to sensible defaults, all of these are derived automatically as we would like. The IDEA bug that used to prevent this has been fixed for two years.
  • Better reproducibility -- in CI runs or other instances where the exact version is passed in, the build should be reproducible (so no timestamps in the manifest!)

The daemon is a useful tool, and the only reason it was so often disabled
in the past was ForgeGradle issues
In general, text files should all be LF in the index, and then you can use your git settings to check out as your local line endings (this should be the default) and let git commit the right stuff
… update plugins, enable configuration caching

A first pass for consistency, and getting everything working on latest gradle and plugin versions
IDEA-317606 was fixed in IJ 2023.3.4
…o single source of truth

System.getenv() is a bad idea with config cache, and use of timestamps requires being careful. In fact, I've removed the use of timestamps altogether in places where they hamper reputability more generally. Changing the project names to match published coordinates simplifies calculating capabilities and artifact names and the like without needing to explicitly specify any of those.
@lukebemish
Copy link
Copy Markdown
Contributor Author

Note: this changes the coordinates the template publishes under to be more consisent. That can be changed back without too much issue by using the old root name to build the project names instead of the mod ID.

@KiriCattus KiriCattus added the hacktoberfest-accepted This PR has been accepted for hacktoberfest label Oct 6, 2025
@KiriCattus KiriCattus self-assigned this Oct 6, 2025
@KiriCattus
Copy link
Copy Markdown
Contributor

All looks amazing to me, had a little tinker around and nothing seems wrong and I like what you've done with the fixes/changes :D Thanks for the PR!

@KiriCattus KiriCattus merged commit dfa5b79 into kiris-mods:dev Oct 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted This PR has been accepted for hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants