mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 16:22:06 +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 {
|
jar {
|
||||||
// Root project should not create empty jar artifact
|
// Root project should not create empty jar artifact
|
||||||
enabled = false
|
enabled = false
|
||||||
|
|
Loading…
Reference in a new issue