现在我的internal track
中的应用程序的版本代码为565800002
,而production
中的应用程序的版本代码为291302934
,它来自{{1 }}。
我想同时增加两个版本号
CircleCI build number * 100,000
和internal
production
上的那个,但我仍然坚持如何操作。答案 0 :(得分:1)
您可以使用任何常规功能或def以编程方式构建版本代码。
例如,
**
* Use the number of seconds/10 since Dec 12 2017 as the versionCode.
* This lets us upload a new build at most every 10 seconds for the
* next 680 years.
*/
def verCode = (int) (((new Date().getTime() / 1000) - 1513056598) / 10)
然后在您的defaultConfig
块中,可以使用
versionCode verCode