1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +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 {
// Root project should not create empty jar artifact
enabled = false