How to set android app version by number of build in Jenkins?

后端 未结 4 973
名媛妹妹
名媛妹妹 2021-02-13 12:12

Application is automatically building by jenkins after successful push, but version is always 1.0. Instead of \"0\" I want to insert number of corresponding build in jenkins: 1.

4条回答
  •  遇见更好的自我
    2021-02-13 12:59

    the configuration at the build.gradle should be

    defaultConfig {
        ...
    
        versionName System.getenv("APP_VERSION") as String ?: "3.0.0 (Default)"
    
        ...
    }
    

    Jenkins Configuration for parse the build parameter

提交回复
热议问题