allprojects/subprojects support for Gradle
From April 17th 2025, Snyk's improved Gradle scanner (available in Snyk Preview) will support allprojects
and subprojects
building blocks.
Existing users of the new scanner should see the improved results in the next re-scan of their projects. Or, to start using the new scanner, see the documentation.
How will my scan results change?
⚠️ For relevant projects, the numbers of dependencies and issues may increase.
For projects with these types of blocks, the new scanner may have previously reported unknown
versions for some dependencies. It will now return the correct version.
In addition, it will include their transitive dependencies, resulting in fewer false negatives.
What are allprojects
and subprojects
?
Gradle provides special blocks called allprojects
and subprojects
which enable sharing code and configuration across projects.
Here is an example of an allprojects
block in a Gradle build file.
// build.gradle
allprojects {
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.apache.commons:commons-collections4:4.2'
}
}