Update to 1.21.10 & improve Gradle build #39
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.
1.21.10 support!
You can see it live in action on my server's BlueMap
In addition to upgrading the paper-api dependency to support 1.21.10, I've made the following changes:
I'll explain each:
Instead of using
provided 'some.dependency:coordinate:version, which has been deprecated since Gradle 7.0 and discouraged since Gradle 3.6, the buildscript now usescompileOnly, the new idiomatic api for essentially the same result. I also changed instances ofimplementation project(":BlueBridgeCore")to usecompileOnlyas well, since we expect both jars in the plugins folder, avoiding shading the core into each addon.As for not having a
settings.gradlein each subproject, this is necessary to run subproject tasks individually outside of the root directory. Otherwise, Gradle will treat the subproject as a separate project and therefore will not resolve the commonallProjectsconfiguration from the rootbuild.gradle. UsingallProjectsis still generally discouraged in favor of a buildSrc module (which actually should use its ownsettings.gradlebut that is out of the scope of this PR and a time consuming task I did not necessarily want to take on)Also, consider using a Kotlin buildscript in the future <3
build.gradle.ktswhile opting to be more verbose in some places, tends to be a lot easier to read for developers hoping to contribute than the old Goovy scripts. It's also recommended by Gradle and the Android team for this reason among othersAnyway, I hope this PR is helpful, cheers! ❤️