Skip to content

Commit

Permalink
feat: add --gradle-accept-legacy-config-roles flag
Browse files Browse the repository at this point in the history
This patch adds the `--gradle-accept-legacy-config-roles` flag, and uses
a version of the Gradle plugin that accepts it. When set by the user,
the plugin will use a more permissive dependency resolution process.

See https://github.com/snyk/snyk-gradle-plugin/pull/191/files for more
details.
  • Loading branch information
muscar committed Oct 29, 2021
1 parent 8102c04 commit 9b50f35
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"snyk-cpp-plugin": "2.12.3",
"snyk-docker-plugin": "4.26.1",
"snyk-go-plugin": "1.18.0",
"snyk-gradle-plugin": "3.16.2",
"snyk-gradle-plugin": "3.17.0",
"snyk-module": "3.1.0",
"snyk-mvn-plugin": "2.26.2",
"snyk-nodejs-lockfile-parser": "1.37.1",
Expand Down
1 change: 1 addition & 0 deletions src/cli/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ export function args(rawArgv: string[]): Args {
'all-sub-projects',
'sub-project',
'gradle-sub-project',
'gradle-accept-legacy-config-roles',
'skip-unresolved',
'scan-all-unmanaged',
'fail-on',
Expand Down
2 changes: 2 additions & 0 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface TestOptions {
initScript?: string;
yarnWorkspaces?: boolean;
gradleSubProject?: boolean;
gradleAcceptLegacyConfigRoles?: boolean;
command?: string; // python interpreter to use for python tests
testDepGraphDockerEndpoint?: string | null;
isDockerUser?: boolean;
Expand Down Expand Up @@ -208,6 +209,7 @@ export type SupportedUserReachableFacingCliArgs =
| 'sequential'
| 'fail-on'
| 'file'
| 'gradle-accept-legacy-config-roles'
| 'gradle-sub-project'
| 'ignore-policy'
| 'init-script'
Expand Down
4 changes: 4 additions & 0 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ module.exports = {
from: 'node_modules/@snyk/java-call-graph-builder/bin/init.gradle',
to: '../bin',
},
{
from: 'node_modules/snyk-gradle-plugin/lib/legacy-init.gradle',
to: '../lib',
},
{
from: 'node_modules/snyk-gradle-plugin/lib/init.gradle',
to: '../lib',
Expand Down

0 comments on commit 9b50f35

Please sign in to comment.