mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 10:37:59 +01:00
Add maybeCheckForSnapshotDependencies to build.gradle
to check for Snapshot dependencies in release builds.
This commit is contained in:
parent
eeea0e34ca
commit
066a4d6c9e
1 changed files with 13 additions and 0 deletions
13
build.gradle
13
build.gradle
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue