Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use null-safe operator to accommodate versionless deps

`snapshotDependencyCheck` interrogates dependent modules to see if
their versions are SNAPSHOTs.  Prior to this change, the build would
fail if a dependency did not declare a version.  Now it will tolerate
this.

It is an uncommon use case, but spring-android has it because they
compile against an exploded set of classfiles, which are inherently
without version metadata.
  • Loading branch information...
commit 0125557e96595e924d307c8b23ff5ee5eada150d 1 parent 94da8b2
@cbeams cbeams authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  checks.gradle
View
2  checks.gradle
@@ -30,7 +30,7 @@ task snapshotDependencyReport {
javaprojects.each { project ->
project.sourceSets.main.compileClasspath.allDependencies.each { dep ->
- if (dep.version.endsWith('SNAPSHOT')) {
+ if (dep.version?.endsWith('SNAPSHOT')) {
if (snapshotDependencies[project] == null)
snapshotDependencies[project] = new ArrayList<Dependency>()
snapshotDependencies[project].add(dep)
Please sign in to comment.
Something went wrong with that request. Please try again.