How to have a snapshot version


(Jordan Zimmerman) #1

I’d like to have have a snapshot version and a release version. Is there a best practice for doing this?


(Szczepan Faber) #2

Hey Jordan.

It really depends on the use cases you’re trying to solve and various other details :slight_smile: For example: who consumes the versions, what build systems, what kind of metadata your publications require (ivy model vs maven model), etc.

I’m assuming that you would like one of your projects to produce release / snapshot versions? One way of implementing that is to use the maven plugin. This way you can publish snapshot / release artifacts to the maven repo. They can be consumed by any gradle project.

Hope that helps!


(Jordan Zimmerman) #3

It seems silly to use the Maven plugin when I’m trying to get away from Maven.


(Szczepan Faber) #4

I think I understand your concern :slight_smile:

When you apply maven plugin in gradle you are not using maven. You’re simply taking advantage of some well-known conventions around artifact publishing. This is quite useful.

If you’re unhappy with maven’s way of dealing with snapshots take a look at ivy’s ‘latest.integration’ commodity.