Copilot commented on code in PR #15365:
URL: https://github.com/apache/grails-core/pull/15365#discussion_r2746818407
##########
grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/commands/ApplicationContextCommandTask.groovy:
##########
@@ -20,7 +20,13 @@ package org.grails.gradle.plugin.commands
import groovy.transform.CompileStatic
+import org.gradle.api.model.ObjectFactory
+import org.gradle.api.provider.ProviderFactory
import org.gradle.api.tasks.JavaExec
+import org.gradle.jvm.toolchain.JavaToolchainService
+import org.gradle.process.internal.ExecActionFactory
+
Review Comment:
These Gradle types are imported but not used in this class (`ObjectFactory`,
`ProviderFactory`, `JavaToolchainService`, `ExecActionFactory`). If you don’t
need them for injection, please remove the unused imports to avoid compilation
warnings or failures under stricter linting.
##########
grails-forge/gradle/test-config.gradle:
##########
@@ -17,6 +17,13 @@
* under the License.
*/
+// Add JUnit Platform launcher dependency required by Gradle 9 for running
tests
+// Also add ByteBuddy for Spock mocking on Java 17+ (CGLIB doesn't support
Java 17 class files)
+dependencies {
+ testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
Review Comment:
`testRuntimeOnly 'org.junit.platform:junit-platform-launcher'` is declared
without a version. Since `gradle/test-config.gradle` is applied to projects
like `grails-forge/test-core` that don’t use a platform/BOM providing JUnit
Platform versions, dependency resolution will fail. Please either add an
explicit version (or a version constraint), or import a JUnit BOM/platform that
provides `junit-platform-launcher`.
```suggestion
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.2'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]