This repository was archived by the owner on Dec 20, 2025. It is now read-only.
Repository navigation
chore(dependency): add explicit dependency of groovy-json in gate-web while upgrading groovy 3.x - #1712
Merged
Conversation
… while upgrading groovy 3.x With groovy 2.5.15 and spockframework 1.3-groovy-2.5, groovy-json appear as transitive dependency of [spockframework](https://mvnrepository.com/artifact/org.spockframework/spock-core/1.3-groovy-2.5) as shown below: ``` $ ./gradlew gate-web:dI --dependency groovy-json --configuration testCompileClasspath > Task :gate-web:dependencyInsight org.codehaus.groovy:groovy-json:2.5.15 Variant compile: | Attribute Name | Provided | Requested | |--------------------------------|----------|-------------------| | org.gradle.status | release | | | org.gradle.category | library | library | | org.gradle.libraryelements | jar | classes+resources | | org.gradle.usage | java-api | java-api | | org.gradle.dependency.bundling | | external | | org.gradle.jvm.environment | | standard-jvm | | org.gradle.jvm.version | | 11 | Selection reasons: - By constraint - Forced org.codehaus.groovy:groovy-json:2.5.15 \--- io.spinnaker.kork:kork-bom:7.190.0 \--- testCompileClasspath org.codehaus.groovy:groovy-json:2.5.4 -> 2.5.15 +--- org.spockframework:spock-core:1.3-groovy-2.5 | +--- testCompileClasspath (requested org.spockframework:spock-core) | +--- io.spinnaker.kork:kork-bom:7.190.0 | | \--- testCompileClasspath | \--- org.spockframework:spock-spring:1.3-groovy-2.5 | +--- testCompileClasspath (requested org.spockframework:spock-spring) | \--- io.spinnaker.kork:kork-bom:7.190.0 (*) \--- org.spockframework:spock-spring:1.3-groovy-2.5 (*) ``` While upgrading groovy 3.0.10 and spockframework 2.0-groovy-3.0, groovy-json is not part of [spockframework](https://mvnrepository.com/artifact/org.spockframework/spock-core/2.0-groovy-3.0) and and encounter below error during test compilation: ``` > Task :gate-web:compileTestGroovy FAILED startup failed: /gate/gate-web/src/test/groovy/com/netflix/spinnaker/gate/controllers/ApplicationControllerSpec.groovy: 22: unable to resolve class groovy.json.JsonSlurper @ line 22, column 1. import groovy.json.JsonSlurper ^ /gate/gate-web/src/test/groovy/com/netflix/spinnaker/gate/controllers/BuildControllerSpec.groovy: 23: unable to resolve class groovy.json.JsonSlurper @ line 23, column 1. import groovy.json.JsonSlurper ^ /gate/gate-web/src/test/groovy/com/netflix/spinnaker/gate/controllers/EcsClusterControllerSpec.groovy: 22: unable to resolve class groovy.json.JsonSlurper @ line 22, column 1. import groovy.json.JsonSlurper ^ 3 errors ``` So, adding explicit dependency of groovy-json in gate-web.gradle
dbyron-sf
approved these changes
Sep 20, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
With groovy 2.5.15 and spockframework 1.3-groovy-2.5, groovy-json appear as transitive dependency of spockframework as shown below:
While upgrading groovy 3.0.10 and spockframework 2.0-groovy-3.0, groovy-json is not part of spockframework and and encounter below error during test compilation:
So, adding explicit dependency of groovy-json in gate-web.gradle