Skip to content

Commit

Permalink
Merge pull request #205 from diffplug/bugfix-plugin-maven-depends-on-…
Browse files Browse the repository at this point in the history
…snapshots

Fix problem where plugin-maven might be published with snapshot deps
  • Loading branch information
nedtwigg authored Feb 16, 2018
2 parents df0ff48 + 675233e commit 943882c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions plugin-maven/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

### Version 1.10.0-SNAPSHOT - TBD ([javadoc](https://diffplug.github.io/spotless/javadoc/spotless-maven-plugin/snapshot/), [snapshot](https://oss.sonatype.org/content/repositories/snapshots/com/diffplug/spotless/spotless-maven-plugin/))

* Fix build to ensure that published versions never have snapshot deps ([#205](https://github.com/diffplug/spotless/pull/205)).

### Version 1.0.0.BETA1 - February 11th 2017 ([javadoc](https://diffplug.github.io/spotless/javadoc/spotless-maven-plugin/1.0.0.BETA1/), [jcenter](https://bintray.com/diffplug/opensource/spotless-maven-plugin/1.0.0.BETA1))

* Maven plugin written by [Konstantin Lutovich](https://github.com/lutovich).
Expand Down
10 changes: 8 additions & 2 deletions plugin-maven/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,14 @@ def mvnw(String args) {
}

dependencies {
compile project(":lib")
compile project(":lib-extra")
if (!project.versionMaven.endsWith('-SNAPSHOT') && project.versionLib.endsWith('-SNAPSHOT')) {
// gradle = release, lib = snapshot, therefore gradle should depend on the last stable lib
compile "com.diffplug.spotless:spotless-lib:${project.stableLib}"
compile "com.diffplug.spotless:spotless-lib-extra:${project.stableLib}"
} else {
compile project(':lib')
compile project(':lib-extra')
}
compileOnly "org.apache.maven:maven-plugin-api:${VER_MAVEN_API}"
compileOnly "org.apache.maven.plugin-tools:maven-plugin-annotations:${VER_MAVEN_API}"
compileOnly "org.eclipse.aether:aether-api:${VER_ECLIPSE_AETHER}"
Expand Down

0 comments on commit 943882c

Please sign in to comment.