Skip to content

Conversation

@pkwarren
Copy link
Member

Create a new compatibility test that verifies the plugin's compatibility with Gradle 8.x and the wrapper version (currently 9.3.0). The test runs a simple 'bufFormat' task with both the Groovy and Kotlin DSL.

As part of this, we're able to safely upgrade the Kotlin version to match the embedded kotlin-dsl as well.

Create a new compatibility test that verifies the plugin's compatibility
with Gradle 8.x and the wrapper version (currently 9.3.0). The test runs
a simple 'bufFormat' task with both the Groovy and Kotlin DSL.

As part of this, we're able to safely upgrade the Kotlin version to
match the embedded `kotlin-dsl` as well.
[versions]
# plugins
kotlin = "2.0.21" # Matches Gradle version: https://docs.gradle.org/8.14.3/userguide/compatibility.html#kotlin
kotlin = "2.2.21" # Matches Gradle version: https://docs.gradle.org/9.3.0/userguide/compatibility.html#kotlin
Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to bump this version to keep in sync with the version used by kotlin-dsl but wanted to verify the plugin continues to work with older versions of Gradle.

.apply {
// Use specific Gradle version if set, otherwise use wrapper version
if (version != GradleVersions.GRADLE_WRAPPER) {
withGradleVersion(version)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Slick. Maybe it's time for a "params" argument encapsulating all of the various versions with a default value for each one?

Copy link
Member Author

Choose a reason for hiding this comment

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

That could be good - I'll think on it some. The other ones are wired in via the build DSL (and kept updated with dependabot), so may not make sense.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Depends on how much interoperability you want to maintain. I do it a lot internally for my build plugin repository with Lists.cartesianProduct as the combination generator. Looks like that's in here for image formats and compression schemes:

@pkwarren pkwarren merged commit 4ae6889 into main Jan 26, 2026
12 of 15 checks passed
@pkwarren pkwarren deleted the pkw/gradle-compatibility-test branch January 26, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants