3

I try to change the version while publishing a android project to my local maven repository. Simple publishing works fine with./gradlew publishToMavenLocal.

While researching I found out that it should be possible to override the version number of my maven package on executing the publishing process. But when executing for example publishToMavenLocal -Pversion="asdf" this does not change the version in anyway. it seems like it is ignored.

I got the idea of the -Pversion flag from the comments of this post Furthermore also the gradle docs say that it should be possible to override the version in some way when building it:

Overriding the default identity values is easy: simply specify the groupId, artifactId or version attributes when configuring the MavenPublication.

i don't know if i got anything wrong but is there a way to override the version of a maven package. Also publishing something like -SNAPSHOT to my local maven repo would help me a lot.

tscheppe
  • 432
  • 4
  • 15

0 Answers0