Add explicit junit-platform-launcher dependency and upgrade to Gradle 9.1.0#4
Add explicit junit-platform-launcher dependency and upgrade to Gradle 9.1.0#4
Conversation
* Moving test runtime and CI to Java 25 * Gradle 9.1.0 * More version bumping * Groovy shaded ASM only supports up to Java 21 * still need to remove this groov2test thing i think * Restore Java 21 for toolchain usage in rewrite-kotlin and rewrite-groovy * Use Java 21 through toolchain for rewrite-groovy and rewrite-kotlin * Drop nightly-ci.yml, and merge schedule into ci.yml * Swap order of installed Java versions * Use `rewrite-java-25` in `tools/language-parser-builder` * Use Java 21 by default by installing that last * Revert to Java 21 for now * Nebula release understands Gradle platforms, so we don't need to do anything custom anymore * Revert back to Groovy 3.x * Move things as much as possible to JDK 25 --------- Co-authored-by: Tim te Beek <tim@moderne.io> Co-authored-by: Shannon Pamperl <shannon@moderne.io>
…e#6211) * JavaScript: Cache `node_modules` for `npm()` test utility This makes it much faster to run `npm()` based tests, which use the same `package.json` file (or in between test runs). * Polish * Load from disk
…penrewrite#6213) * Move the tabs-and-indents logic to preVisit * Handling function()s as expression in autoformatting
* Use Kotlin plugin version 2.1 but target 1.9 * Use Kotlin plugin version 2.2.21 * Configure in one place * Drop the "bom" if we need to override the kotlin version anyway
* Unify the indent on the top-level too * Refactoring, simplify tests with no style customizations * Refactoring, simplify tests with no style customizations
…n MavenPomDownloader (openrewrite#6217)
Add a provider for the NPM version so that at the time it gets evaluated, Nebula will already have set the version.
This reverts commit 4409cfe.
…penrewrite#6220) * Drop launcher from rewrite-test, as it's now set in the build plugin This makes for a lighter `rewrite-test` when used by Maven projects. * Have `rewrite-javascript` depend on `rewrite-java-21` for toolchain default * Use `rewrite-java-21` in more places to align with toolchain usage * Fix a dangling reference in rewrite-javascript integration tests * Drop the one test that required rewrite-java-2x
This fixes the CI build failure in Gradle 9.0+ where junit-platform-launcher must be explicitly declared as a testRuntimeOnly dependency. Co-authored-by: gliptak <50109+gliptak@users.noreply.github.com>
|
@copilot build continues to fail |
The current build failure is unrelated to the junit-platform-launcher dependency. The error is: This is a Groovy classpath issue during Gradle configuration (before tests run), not the JUnit Platform test execution error mentioned in the original issue. The original issue was: The current failure happens earlier in the build lifecycle when applying Gradle plugins. This appears to be a pre-existing issue in the base branch, not caused by our changes. |
|
@copilot continue to correct codebase getting to green build |
…latform-launcher-dependency
Fixed by merging upstream/main in commit 4ee04f1. The codebase now:
The original JUnit Platform launcher issue and the subsequent Groovy classpath error are both resolved. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Gradle 9.0+ requires explicit
junit-platform-launcherdeclaration in test runtime classpath. The CI build fails without it:Changes
testRuntimeOnly("org.junit.platform:junit-platform-launcher")torewrite-core/build.gradle.ktsWhile
rewrite-testexposes this transitively viaapi, Gradle 9.0+ enforces explicit declaration in each module that executes tests.dependencies { testImplementation("org.assertj:assertj-core:latest.release") testImplementation(project(":rewrite-test")) testRuntimeOnly("org.junit.platform:junit-platform-launcher") // Added }The merge from upstream/main (commit ffa9575) includes:
Verification
./gradlew :rewrite-core:assemble./gradlew :rewrite-core:testReference: https://docs.gradle.org/9.1.0/userguide/java_testing.html#sec:java_testing_troubleshooting
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.