Giter Club home page Giter Club logo

Comments (7)

 avatar commented on May 25, 2024

Including revision count can cause problems with versionCode -- it's pretty easy to end up with the revCount going down when building from different branches, and Android won't install an old version of an app over a new one.

Also, I haven't really exposed Result as a public data structure so it would need to be documented.

Can you tell me a little more about your use case? Maybe there's another way to achieve it.

from gradle-android-git-version.

arkty avatar arkty commented on May 25, 2024

@gladed Hello, we are generating versionName as follows:
2.1.3 - where 2.1 is the latest tag and 3 is number of commits after latest tag.
After every master/release build(not tag build) we are uploading new version to Play Store beta, but play store rejects apk if versionCode of new apk is the same as previous.
About different branches - afaik android can install older version, if you are doing it manually(e.x from link).

from gradle-android-git-version.

 avatar commented on May 25, 2024

Sorry for the delay. I've been thinking about how best to deal with this kind of requirement.

Instead of allowing users to hack the baseCode what about allowing users to specify custom format for the versionCode, much as is done for versionName?

Something like codeFormat="MNNPPPBBBB" which would allocate one digit for Major, two for Minor, three for Patch, and four for Build (i.e. revcount)? (This would leave possibilities for other codes as well for platform, API level, etc.)

Of course this would conflict with baseCode, parts, and multiplier but would ultimately be a lot more flexible and maybe clearer.

Your thoughts, @arkty ?

from gradle-android-git-version.

arkty avatar arkty commented on May 25, 2024

@gladed i think this will work for most cases. Good idea! What about multiplier and parts? Will codeFormat broke backward compatibility?

from gradle-android-git-version.

 avatar commented on May 25, 2024

I will just deprecate them because I like codeFormat much better :) If codeFormat isn't specified I can have parts and multiplier have their traditional behavior so that backwards compatibility isn't broken. baseCode might be able to stick around though.

from gradle-android-git-version.

arkty avatar arkty commented on May 25, 2024

@gladed great, you can close this issue, might be better to continue conversation in #27?

from gradle-android-git-version.

 avatar commented on May 25, 2024

Sounds good.

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.