-
Notifications
You must be signed in to change notification settings - Fork 40
Bump testing libraries to their latest possible versions #449
Conversation
8.38 requires fixing 12 MissingJavadocType failures on public main source set classes. 9.3 can be used once 8.38 javadocs are fixed, because that's the latest version that supports Java 8. 10.x requires Java 11 in Gradle runtime, while the .github/workflows/unit-tests.yaml is executed on Java 8, Checkstyle 10+ is not viable.
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.
@TWiStErRob Thanks for making these updates! Overall LGTM, apologies for the hassle that some conflicts will need to be resolved here since we've merged #448.
The individual commits were very helpful in tracking the different changes - I’ve updated the PR description with details according to your commit messages for better visibility, please edit or comment if there is anything I am missing or miscapturing here.
build.gradle.kts
Outdated
tasks.checkstyleMain.configure { | ||
// Set up a soft dependency so that verifyGoogleFormat suggests running googleJavaFormat, | ||
// before devs start fixing individual checkstyle violations manually. | ||
shouldRunAfter(tasks.verifyGoogleJavaFormat) | ||
} | ||
tasks.named("checkstyleIntegTest").configure { | ||
// Set up a soft dependency so that verifyGoogleFormat suggests running googleJavaFormat, | ||
// before devs start fixing individual checkstyle violations manually. | ||
shouldRunAfter(tasks.verifyGoogleJavaFormat) | ||
} |
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.
Nit: if I'm understanding the intention here correctly, perhaps something like this could also work?
tasks.withType<Checkstyle> {
shouldRunAfter(tasks.verifyGoogleJavaFormat)
}
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.
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.
Note: never ever ever ever use withType<> {}
it's eager Gradle configuration (it'll create all tasks).
withType<>().configureEach {}
is the lazy new API from docs:
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 planning on opening a PR eventually to make this plugin lazy(er).
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.
Note: never ever ever ever use
withType<> {}
it's eager Gradle configuration (it'll create all tasks).
Ah, thanks for catching this and replacing with the alternative! TIL :)
Conflicts: build.gradle.kts
No worries, I caused the conflicts, I made them auto-resolvable in IDEA. Done in 9c55a6a. |
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.
Thank you for the contribution!
See individual commits for details, copied here for convenience:
readFileToString(File)
withreadFileToString(File, Charset)
junit.Assert.assertThat
withhamcrest.MatcherAssert.assertThat
verifyGoogleFormat
task run before checkstyle tasks (to suggest fixing via./gradlew googleJavaFormat
)