Giter Club home page Giter Club logo

Comments (6)

 avatar commented on June 5, 2024

Good idea. By time of last commit?

from gradle-android-git-version.

odin- avatar odin- commented on June 5, 2024

No, rather the current time when I exported the APK.

The reasoning is that I might upload "betas" (dirty/amended commits) to Google Play Developer Console. Thus if only using version or commit count (B) the versionCode would never increment but Google Play Developer Console would still want me to increase the versionCode.

If we used the exported date I would always have a "new" versionCode number.

Tried to add it myself but I didn't understand how to use my local compiled version of your plugin :-)

from gradle-android-git-version.

 avatar commented on June 5, 2024

Well...a couple things give me pause:

  • I think it is generally safer to push releases from commits, so you always have a record of what is in the playstore.
  • I also think in general that "build time" doesn't tell you as much as "last commit". If I build from the same bits, I should get the same result...no snowflakes!
  • The number of digits available in the versionCode is not sufficient to store a full date stamp unless you toss most or all of the version number ... in which case this plugin probably isn't going to help a ton.

That said, I'm not trying to dictate your build pipeline -- it's yours to decide!

So: I created an X code and pushed this into 0.3.1. This just leaves a 0 which you can fill as you wish by amending baseCode. Sound good?

from gradle-android-git-version.

odin- avatar odin- commented on June 5, 2024

I agree it's safer to push from commits. But let's say I have SW in the beta tab in Google Play Developer Console. Then creating new commits per upload just to step the versionCode (and you need to step the versionCode each time a APK is uploaded) doesn't feel right because perhaps I just want to amend the previous commit. I.e. if I just keep amending based on the comments from my beta testers the versionCode doesn't get increased.

So I want to have some kind of auto increment to be able to push amended commits to the beta section in GPDC.

Any ideas about this?

from gradle-android-git-version.

 avatar commented on June 5, 2024

YMMV, but in my experience a build that other people see deserves its own commit. In the future looking back to see the changes for each beta iteration could have some value. For example, you could change your mind and revert on a single commit. You can't do that if the commit has lots of changes rolled up into it.

But if amending is your workflow, you can also keep adding tags to the same commit to set the version name/code you want to expose. The plugin will always take the latest one, so if a commit has 1.2.345 and 1.2.346 it will take 1.2.346 for the name and code. This would give you the advantage of asking a beta user which one they were on, and you could at least tell they weren't on the latest!

And with the X digit in baseCode you can also try inserting your own clock-based designator into the baseCode if that's what you want to do.

Good luck!

from gradle-android-git-version.

odin- avatar odin- commented on June 5, 2024

OK thank you for your input and the change you did for me!

/ Henrik

from gradle-android-git-version.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.