Skip to content
Snippets Groups Projects
Commit 47e6591e authored by dgelessus's avatar dgelessus
Browse files

Include Sonatype snapshots repo only for snapshot builds

This prevents release builds from accidentally including snapshot
dependencies.
parent 28d74329
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,8 @@ plugins { ...@@ -11,6 +11,8 @@ plugins {
version = "1.0.1-SNAPSHOT" version = "1.0.1-SNAPSHOT"
final isSnapshot = project.version.endsWith("-SNAPSHOT")
final SOURCE_ENCODING = "UTF-8" final SOURCE_ENCODING = "UTF-8"
wrapper { wrapper {
...@@ -20,11 +22,13 @@ wrapper { ...@@ -20,11 +22,13 @@ wrapper {
repositories { repositories {
jcenter() jcenter()
if (isSnapshot) {
maven { maven {
name("Sonatype snapshots") name("Sonatype snapshots")
url("https://oss.sonatype.org/content/repositories/snapshots") url("https://oss.sonatype.org/content/repositories/snapshots")
} }
} }
}
configurations.all { configurations.all {
resolutionStrategy { resolutionStrategy {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment