1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-23 02:58:00 +01:00

Add maybeCheckForSnapshotDependencies to build.gradle

to check for Snapshot dependencies in release builds.
This commit is contained in:
Florian Schmaus 2014-08-20 20:53:17 +02:00
parent eeea0e34ca
commit 066a4d6c9e

View file

@ -138,6 +138,19 @@ task distributionZip(type: Zip, dependsOn: [javadocAll, prepareReleasedocs, mark
} }
} }
task maybeCheckForSnapshotDependencies {
// Don't check for Snapshot dependencies if this is a snapshot.
if (isSnapshot) return
allprojects { project ->
project.configurations.runtime.each {
if (it.toString().contains("-SNAPSHOT"))
throw new Exception("Release build contains snapshot dependencies: " + it)
}
}
}
test { dependsOn maybeCheckForSnapshotDependencies }
jar { jar {
// Root project should not create empty jar artifact // Root project should not create empty jar artifact
enabled = false enabled = false