0

更新到 gradle 7.3.2 后,我遇到了这个问题:

  • 出了什么问题:任务“:bps-ips-bridge-core:snykResolvedDepsJson”执行失败。

未找到匹配配置:^(runtimeOnly|implementation)$,项目项目“:myProject”的可用配置:[annotationProcessor, api, apiElements, archives, bootArchives, checkstyle, compileClasspath, compileOnly, compileOnlyApi, default, developmentOnly, implementation, jacocoAgent, jacocoAnt,productionRuntimeClasspath,provided,providedCompile,providedRuntime,runtimeClasspath,runtimeElements,runtimeOnly,签名,testAnnotationProcessor,testCompileClasspath,testCompileOnly,testImplementation,testRuntimeClasspath,testRuntimeOnly]

这是 Jenkinsfile 中的 snyk 阶段的样子:

 stage('Snyk Checking') {
            steps {
                sh 'echo test snyk'
                snykSecurity(snykInstallation: 'snyk', snykTokenId: 'snyk-api-token', failOnIssues: true, severity: 'high', targetFile: 'my-project/build.gradle', additionalArguments: '--configuration-matching=^(runtimeOnly|implementation)$')
            }
        }

之前更新gradle之前是这样的:--configuration-matching=^(runtime|compile)

问题是什么以及如何解决?

4

1 回答 1

0

Snyk 不需要额外的参数。这部分可以删除:

additionalArguments: '--configuration-matching=^(runtimeOnly|implementation)$'
于 2022-01-25T14:20:48.007 回答