• Version 3.17.0
  • Published
  • 82.6 kB
  • 8 dependencies
  • Apache-2.0 license


npm i snyk-gradle-plugin
yarn add snyk-gradle-plugin
pnpm add snyk-gradle-plugin


Snyk CLI Gradle plugin



variable exportsForTests

const exportsForTests: {
buildArgs: typeof buildArgs;
extractJsonFromScriptOutput: typeof extractJsonFromScriptOutput;
getVersionBuildInfo: typeof getVersionBuildInfo;
toCamelCase: typeof toCamelCase;
getGradleAttributesPretty: typeof getGradleAttributesPretty;
getPluginFileName: typeof getPluginFileName;


    function buildArgs

    buildArgs: (
    root: string,
    targetFile: string | null,
    initGradlePath: string,
    options: Options
    ) => string[];

      function buildGraph

      buildGraph: (
      snykGraph: { [dependencyId: string]: SnykGraph },
      projectName: string,
      projectVersion: string
      ) => Promise<DepGraph>;

        function extractJsonFromScriptOutput

        extractJsonFromScriptOutput: (stdoutText: string) => JsonDepsScriptResult;

          function formatArgWithWhiteSpace

          formatArgWithWhiteSpace: (arg: string) => string;

            function getPluginFileName

            getPluginFileName: (options: Options) => string;

              function getVersionBuildInfo

              getVersionBuildInfo: (
              gradleVersionOutput: string
              ) => VersionBuildInfo | undefined;

                function inspect

                inspect: {
                root: string,
                targetFile: string,
                options?: api.SingleSubprojectInspectOptions & GradleInspectOptions
                ): Promise<api.SinglePackageResult>;
                root: string,
                targetFile: string,
                options: any
                ): Promise<api.MultiProjectResult>;

                  function processProjectsInExtractedJSON

                  processProjectsInExtractedJSON: (
                  root: string,
                  extractedJSON: JsonDepsScriptResult
                  ) => Promise<JsonDepsScriptResult>;

                    function toCamelCase

                    toCamelCase: (input: string) => string;


                      interface GradleInspectOptions

                      interface GradleInspectOptions {}

                        property 'configuration-attributes'

                        'configuration-attributes'?: string;

                          property 'configuration-matching'

                          'configuration-matching'?: string;

                            property callGraphBuilderTimeout

                            callGraphBuilderTimeout?: number;

                              property daemon

                              daemon?: boolean;

                                property gradleAcceptLegacyConfigRoles

                                gradleAcceptLegacyConfigRoles?: boolean;

                                  property initScript

                                  initScript?: string;

                                    property reachableVulns

                                    reachableVulns?: boolean;

                                      interface JsonDepsScriptResult

                                      interface JsonDepsScriptResult {}

                                        property allSubProjectNames

                                        allSubProjectNames: string[];

                                          property defaultProject

                                          defaultProject: string;

                                            property projects

                                            projects: ProjectsDict;

                                              property versionBuildInfo

                                              versionBuildInfo?: VersionBuildInfo;

                                                Package Files (1)

                                                Dependencies (8)

                                                Dev Dependencies (16)

                                                Peer Dependencies (0)

                                                No peer dependencies.


                                                To add a badge like this badgeto your package's README, use the codes available below.

                                                You may also use to create a custom badge linking to

                                                • Markdown
                                                • HTML
                                                  <a href=""><img src="" alt=""></a>