Git repositories with Maven and Gradle

Git services available for Maven and Gradle Projects

Improved Gradle SCM scanning

Release status

Improved Gradle SCM scanning is in Early Access.

You can now obtain more accurate results for your Gradle Projects imported through Git integrations by using Improved Gradle SCM scanning.

Supported Gradle features

The following lists some of the main supported Gradle features:

Some Gradle features are not supported, and this may influence the scan results. These Gradle features include:

  • Custom configuration in buildSrc directories

  • Dependencies introduced via plugins.

If you see unexpected results from this Early Access feature, contact Snyk support.

How to enable improved Gradle SCM scanning

Improved Gradle scanning supports importing a maximum limit of 5,000 build.gradle(.kts) files per Git repository. Attempts to import repos with more than 5,000 Gradle build files will fail.

To enable this feature, follow these steps for your Snyk Organisation:

  1. Configure package repository integrations (if you use Artifactory or Nexus, see below).

  2. Enable Improved Gradle scanning in Snyk Preview.

After Improved Gradle SCM scanning is enabled:

  • Previously imported Git repositories will have existing Gradle Groovy DSL Projects automatically updated on the next manual or recurring test.

  • Re-import the repository to start seeing results for Gradle Kotlin DSL Projects.

Configure language settings for Snyk for Java

Configure language settings for your open source and licensing at the Organization level. The configuration settings apply to all Projects in that Organization.

  1. Open Snyk Web UI and go to Settings > Languages section.

  2. Under Languages, go to Java and select Edit settings.

  3. Configure the settings for Maven.

  4. Update Settings to save changes.

Package repository integrations

If your application build uses private package repositories, you must configure the relevant Snyk integration to get the most accurate results.

To use package repository integrations with the Improved Gradle scanning Early Access feature, use the configuration instructions and settings for Maven.

These will be detected and used in improved Gradle scans.

In the Java language settings, you can integrate Snyk with your private package repositories (for example, Artifactory or Nexus).

This enables Snyk to build a complete dependency tree when scanning Maven or Gradle (Early Access) projects that reference private packages.

For more information, see Package repository integrations.

Last updated

More information

Snyk privacy policy

© 2024 Snyk Limited | All product and company names and logos are trademarks of their respective owners.