Add code below to your adle file the /app directory: import. Using gradle-git library to accomplish the above objectives. Doesn't rely on any files outside of repo.App with this versionCode is submittable to GooglePlay.versionCode is generated automatically and consistently on any machine (including a Continuous Integration and/or Continuous Deployment server).Your version properties would need to look like this: VERSION_NUMBER=1Īnother way of getting a versionCode automatically is setting versionCode to the number of commits in the checked out git branch. Patch and versionCode is increased if you assemble your project through the terminal with 'assemble', 'assembleRelease' or 'aR' which creates a new folder in your project root called apk/RELEASE so you don't have to look through build/outputs/more/more/more to find your apk. Throw new GradleException("Could not read version.properties!") I tried the extra properties, but you can't save them, which means that next time I build it I'm getting the same versionCode.Īny help would be very much appreciated! project.ext") Until now I used the Manifest file to increase the versionCode, but I would like to read the versionCode from an external file and depending if it is the release flavor or the debug flavor increase the versionCode. The dependency section in the build.I'm building an Android app with gradle.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |