Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure Gradle for Dev Efficiency #2787

Merged
merged 9 commits into from
Jan 31, 2025
Merged

Restructure Gradle for Dev Efficiency #2787

merged 9 commits into from
Jan 31, 2025

Conversation

krossgg
Copy link
Contributor

@krossgg krossgg commented Jan 25, 2025

What

  • Reformat the Gradle Version Catalog to use the .toml format, as it is easier to update and add dependencies as needed.
    • Dependencies have been changed to specifically refer to 1.20.1 Forge, as that is the only version being targeted by this branch.
    • Lines in dependencies.gradle have been changed to reflect this
  • Enable the use of machete, the jar compression tool, during CI actions, specifically when the 1.20.1/1.21 branches are pushed to or when a release is being published.
  • Cleans up various parts of the build scripts
  • Update Gradle to 8.11
  • Update the following plugins:
    • ModDevGradle 2.0.52-beta -> 2.0.64-beta
      • While there are newer versions available, there is currently a publishing bug with the Legacy plugin past this version. See here
      • Some buildscript syntax has changed due to this update
      • This update makes all modX configurations completely non-transitive
    • Spotless: 6.25.0 -> 7.0.2
      • Spotless will now only check for changes with regards to origin/1.20.1, which should help speed up spotless operations
    • Lombok: Plugin from 8.7.1 -> 8.11 and version from 1.18.32 -> 1.18.36
    • Shadow (if ever needed): 7.1.2 -> 8.3.5
    • Jetbrains Annotations: 24.1.0 -> 26.0.1
  • Update LDLib from 1.0.31 to 1.0.33.b, without issue
  • Change dependencies to use FTB Maven for FTB mods
  • Remove the rei-api artifact as a dependency, as it is both unnecessary and was the causing for spamming EnvType.Client during builds. See REI's repository for the recommendation.
  • Restructure repositories.gradle so that we use preferred repositories for dependencies known to be there, reducing dependency resolution time
  • Fix the mixin refmap not being included in the slim jar
  • Disable removal javac linting as well as suppressing the mixin annotation processor's [Note] level console out
  • Change the maven-java publish settings to actually add the sources jar as a tagged variant rather than simply attaching the artifact
  • Enables Gradle's parallel configuration and build caching in gradle.properties for faster build times
    • Seems to not cause problems, can always be disabled if necessary

Outcome

Happy.

@krossgg krossgg added the type: refactor Suggestion to refactor a section of code label Jan 25, 2025
@krossgg krossgg requested a review from a team as a code owner January 25, 2025 09:46
Copy link
Member

@Ghostipedia Ghostipedia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, I'd like @screret or @TechLord22 to double check over this as well
👍

@krossgg krossgg merged commit cbff31b into 1.20.1 Jan 31, 2025
2 checks passed
@krossgg krossgg deleted the kr/gradle-2 branch January 31, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactor Suggestion to refactor a section of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants