-
Notifications
You must be signed in to change notification settings - Fork 548
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
Convert to Gradle Kotlin DSL #4175
base: master
Are you sure you want to change the base?
Conversation
Pro Tip!
If your changes do not fall into any of these categories, don't worry. You can just ignore this message in that case! 👀 |
Slimefun preview buildA Slimefun preview build is available for testing! https://preview-builds.walshy.dev/download/Slimefun/4175/bfb6574f
|
Noticed intellij has an error with |
…t clean when building in gradle-compiler action
… slightly different file
…l-request action to build with a custom project version
…platform-launcher
- name: Validate Gradle Wrapper | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: Grant Wrapper Permission |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we do this locally once (and push) instead of doing it every time in every task we want to invoke gradle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure how the actions work so will need to figure out what you mean by that exactly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build.gradle.kts
Outdated
assemble { | ||
dependsOn(shadowJar) | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assemble { | |
dependsOn(shadowJar) | |
} |
This bit is unneeded, shadowJar
automatically assembles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but assemble does not automatically shadow. Without this calling gradle build
will only build the unshaded jar. Nonetheless, we can remove this and just do gradle shadowJar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep that's what I do with my gradle spigot plugins, no need to attach it to build
include("plugin.yml") | ||
include("config.yml") | ||
include("item-models.yml") | ||
include("wiki.json") | ||
include("languages/translators.json") | ||
include("tags/*.json") | ||
include("biome-maps/*.json") | ||
include("languages/**/*.yml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really needed? AFAIK all resources are automatically included
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, I'd have thought so too but I wonder why it was explicitly declared in the pom so I honored that explicit declaration. Can remove if there are no other reasons for it being explicitly declared.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm all stuff is automatically included without that code
include("tags/*.json") | ||
include("biome-maps/*.json") | ||
include("languages/**/*.yml") | ||
filesMatching("plugin.yml") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be replaced with the plugin-yml
gradle plugin, tho idk how much others will want it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, haven't gotten to that part yet so I left it as we used to with maven resource filtering.
Description
PoC of using Gradle as the buildscript
Proposed changes
Remove all maven buildscripts
Use the gradle wrapper and the gradle Kotlin DSL for buildscripts
Bumped minimum Java version to 17 due to dependency incompatibilities with Authlib being compiled against java 17.
Related Issues (if applicable)
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values