After updating to gradle 7.3.2 I get this issue:
Matching configurations not found: ^(runtimeOnly|implementation)$, available configurations for project project ':myProject': [annotationProcessor, api, apiElements, archives, bootArchives, checkstyle, compileClasspath, compileOnly, compileOnlyApi, default, developmentOnly, implementation, jacocoAgent, jacocoAnt, productionRuntimeClasspath, provided, providedCompile, providedRuntime, runtimeClasspath, runtimeElements, runtimeOnly, signatures, testAnnotationProcessor, testCompileClasspath, testCompileOnly, testImplementation, testRuntimeClasspath, testRuntimeOnly]
This is how the snyk stage in the Jenkinsfile looks like:
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)$')
}
}
It used to be like this before updating gradle: --configuration-matching=^(runtime|compile)
What is the problem and how to solve it?
Snyk does not need the additional arguments. This part can be deleted:
additionalArguments: '--configuration-matching=^(runtimeOnly|implementation)$'