This is an old revision of the document!
This discusses the process for getting an Android application built for release. It is very cryptic right now, but I wanted to get some of the latest changes to the build process documented somewhere.
Android APKs' require versioning and build number information. Each new APK on the Play Store must have a newer build number than previous APK's. This process attempts to somewhat automate this process. It has yet to be completely tested in reality, but it does seem to work better than the previous manual approach.
To begin with the process takes advantage of Gradle environment variables. Four variables are used, versionMajor, versionMinor, versionHotfix and buildNum. The first three are currently manually set and represent the application version number. 2.4.1 for example. The buildNum variable is retrieved from a Jenkins environment variable or hardcoded to 9999 for desktop builds. The Jenkins build number is always unique for the build being created. The following code block is inserted in the build.gradle file for the Application being built.
Major.Minor.Hotfix is defined here to identify the build correctly These are used in the Manifest to correctly set the versionCode and versionName The buildNum must increment for each APK/Bundle built. ext { versionMajor = 2 versionMinor = 4 versionHotfix = 2 buildNum = System.getenv(“BUILD_NUMBER”) as Integer ?: 9999 } To use