Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seperate version/code information for build flavours #7

Open
ed-george opened this issue Feb 13, 2015 · 7 comments
Open

Seperate version/code information for build flavours #7

ed-george opened this issue Feb 13, 2015 · 7 comments

Comments

@ed-george
Copy link

Is it currently possible to have multiple advancedVersioning for multiple build flavours?

@bogdanRada
Copy link

any updates on this? it's been almost two years...i really need this feature also :)

@NovaViper
Copy link

I dont think it's coming back guys, however I did found a way for advanced versioning, you can look in my build.gradle

@bogdanRada
Copy link

bogdanRada commented Apr 26, 2017

i feel so sad 😢 I really liked this library . Thanks @NovaViper for the info. I am currently doing something similar to that but i was hoping i could make my build.gradle cleaner .

My implementation is a bit more complicated though. I am keeping different versions for each variant (you can see it here: https://gist.github.com/bogdanRada/fa31fa8451b82be05a6dba810c4bfd2a) .The only problem that i am facing now is that i need to figure out how to NOT increase the version if am assembling the app only for testing locally, because that increases the version several times if i re-run the app on the emulator several times before i am sure i want to release the app. Still trying to figure that out.

Currently the only way i am thinking to resolve that is by showing a confirmation, but is really annoying. Currently as a hack i only increase the patch level if version was not changed already. But that looks brittle too.

Anyway, sorry for the detailed response. My situation has nothing to do with this library.

I would really like to see this library evolve :) That would really help me keep my build gradle cleaner.

@NovaViper
Copy link

@bogdanRada It's cool! I have that same problem with the versioning I have aswell.. Not sure how I can stop it from increasing though

@moallemi
Copy link
Owner

Hi guys!

Currently you can use separate version code and name for each product flavours:

    productFlavors {

        production {
            advancedVersioning {
                nameOptions {
                    versionMajor 4
                    versionMinor 5
                    versionPatch 6
                    versionBuild 7
                }
                codeOptions {
                    versionCodeType VersionCodeType.DATE
                }
            }
            versionName advancedVersioning.versionName
            versionCode advancedVersioning.versionCode
        }

        beta {
            advancedVersioning {
                nameOptions {
                    versionMajor 2
                    versionMinor 3
                    versionPatch 4
                    versionBuild 5
                }
                codeOptions {
                    versionCodeType VersionCodeType.DATE
                }
            }
            versionName advancedVersioning.versionName
            versionCode advancedVersioning.versionCode
        }
    }

@bogdanRada
Copy link

Nice . Thank You very much

@piotrkst
Copy link

piotrkst commented Apr 7, 2020

How about separate:
versionCodeType 'AUTO_INCREMENT_ONE_STEP'

For instance if you let us set the name for the variable in version.properties that would be enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants