Comments (7)
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.
@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.
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.
@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.
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.
@gladed great, you can close this issue, might be better to continue conversation in #27?
from gradle-android-git-version.
Sounds good.
from gradle-android-git-version.
Related Issues (20)
- Remove deprecated items
- Replace commitHashLength with format extension
- Replace untrackedIsDirty with format extension
- Use --first-parent strategy
- Match git-describe commit hash
- Document git-describe format HOT 1
- Changelog HOT 1
- Describe output is empty? HOT 5
- Clean up testNearestTag test
- Recent update of jgit breaks compatibility with older Gradle versions HOT 1
- .. HOT 1
- [question] Support for incremental versionCode separately from versionName? HOT 6
- Different format per buildType? HOT 2
- Bare Repository has neither a working tree, nor an index via execution of git hooks HOT 12
- Include proper task descriptions
- Add direct access to components
- Nearest tag with optional tagPattern
- Unable to download jgit from jcenter
- It's keep saying untagged even though I already did
- Allow different format for non-tagged version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-android-git-version.