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

[Feat] Gradle Build Chain Rework #12

Merged
merged 12 commits into from
Jul 8, 2024
Merged

[Feat] Gradle Build Chain Rework #12

merged 12 commits into from
Jul 8, 2024

Conversation

Bram1903
Copy link
Collaborator

@Bram1903 Bram1903 commented Jul 7, 2024

Gradle Build Chain Rework

This PR overhauls the Gradle Build Chain by switching from Groovy to Kotlin DSL and introducing a buildSrc module. These changes enhance convenience and ease of maintenance, reducing duplicated configurations by consolidating them into convention plugins.

Tasks

  • Kotlin DSL: Rewrote the build chain to use Kotlin DSL.
  • Googler's Shadow Fork: Switched from johnrengelman's shadow plugin to googler's fork (See: Future home/support for Shadow? GradleUp/shadow#908)
  • Version Injection: Added a task to inject the current version into the codebase as a static instance: ELVersions.
  • Commit Hash: Added the current commit hash to the version.
  • Non-Blocking Update Checker: Modified the update checker to be non-blocking.
  • Update Checker Fixes: Ensured the update checker uses the tag_name field from the GitHub API instead of name.
  • RunServer Improvement: Improved the current runServer task to apply a more advanced configuration, and to easily test Folia.

Global Versioning

This PR introduces global versioning, allowing the update of a single version in the root build.gradle.kts. This update is automatically propagated throughout the project. A new task in buildSrc injects an ELVersions class during compilation, holding the latest version using the PEVersion class. This class simplifies version comparison and management.

Update Checker Improvements

The update checker has been refactored to:

  • Operate asynchronously, preventing it from blocking the main thread.
  • Utilize the tag_name field from the GitHub API, ensuring compatibility when additional information is included in the title.

@Bram1903 Bram1903 added the enhancement New feature or request label Jul 7, 2024
@Bram1903 Bram1903 requested a review from Tofaa2 July 7, 2024 16:31
@Bram1903 Bram1903 self-assigned this Jul 7, 2024
@Bram1903 Bram1903 marked this pull request as draft July 7, 2024 16:37
Renamed: entitylib.java-conventions.gradle.kts -> entitylib.library-conventions.gradle.kts
Switched: johnrengelman's shadow to googler's shadow fork
@Bram1903 Bram1903 marked this pull request as ready for review July 7, 2024 17:38
@Tofaa2 Tofaa2 merged commit 304606b into master Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants