docs: update documentation for Gradle plugin#7143
Merged
jeremylong merged 1 commit intodependency-check:mainfrom Nov 12, 2024
Merged
docs: update documentation for Gradle plugin#7143jeremylong merged 1 commit intodependency-check:mainfrom
jeremylong merged 1 commit intodependency-check:mainfrom
Conversation
Contributor
Author
|
@jeremylong does that mean you would like me to update my pull request by changing the dependencyCheck {
analyzers.assemblyEnabled=false
analyzers.artifactory.enabled=true
analyzers.artifactory.url='https://internal.artifactory.url'
analyzers.retirejs.filters = ['(i)copyright Jeremy Long']
} |
Collaborator
|
I'm ambivalent regarding the way this is documented. If the example works and doesn't produce warnings about deprecated functions - I'm good. How this is done is a matter of style and different teams will have different opinions. I'm not sure if there is any official preference/style guide for gradle. |
jeremylong
approved these changes
Nov 12, 2024
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.
Fixes Issue
Description of Change
Update the "Example" and "Advanced Configuration" sections of the Gradle plugin documentation to use non-deprecated code samples.
Using a closure to configure
proxyordatais now deprecated:https://github.com/dependency-check/dependency-check-gradle/blob/aaab86c7fa26a855a625999df24d6907f088ce85/src/main/groovy/org/owasp/dependencycheck/gradle/extension/DependencyCheckExtension.groovy#L229-L232
https://github.com/dependency-check/dependency-check-gradle/blob/aaab86c7fa26a855a625999df24d6907f088ce85/src/main/groovy/org/owasp/dependencycheck/gradle/extension/DependencyCheckExtension.groovy#L328-L337
When adding this plugin to a project today, I noticed that a code snippet in my
build.gradle, similar to examples in the documentation, was highlighted in IntelliJ as being deprecated. I'm not super well versed in Gradle, but I was able to quickly find a fix which works for configuring theDependencyCheckExtensionand does not rely on using a closure.I don't know what the best way to update the
analyzerscode sample in theconfiguration-aggregatedocumentation would be, though:https://github.com/jeremylong/DependencyCheck/blob/531743481768dd089f3f354284f8fd5495de77cf/src/site/markdown/dependency-check-gradle/configuration-aggregate.md?plain=1#L193-L206
https://github.com/dependency-check/dependency-check-gradle/blob/aaab86c7fa26a855a625999df24d6907f088ce85/src/main/groovy/org/owasp/dependencycheck/gradle/extension/DependencyCheckExtension.groovy#L307-L316
I feel like there's a better way to do it than the code below, so I did not include a change for this in my pull request. If anyone has suggestions on how to best write this configuration without using a closure, I'd love to hear your suggestions!
dependencyCheck { analyzers.assemblyEnabled=false analyzers.artifactory.enabled=true analyzers.artifactory.url='https://internal.artifactory.url' analyzers.retirejs.filters = ['(i)copyright Jeremy Long'] }Have test cases been added to cover the new functionality?
no Because new functionality has not been added.