Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Jenkins to build different flavors of the same project

I'm using Jenkins to build our companies Android application. In the gradle.build file, I have specified two separate types of build, debug, and production.

buildTypes {
    //TODO fix this so that signing works with release version
    debug {
        buildConfigField "boolean", "RELEASE", "false"
    }
    release {
        buildConfigField "boolean", "RELEASE", "true"
    }
}

How can I manually trigger Jenkins to build the release version?

Thanks, -Mark

like image 458
Marcubus Avatar asked Jan 09 '23 22:01

Marcubus


1 Answers

Use a parameterized build - the parameter value will be available as an environment variable that you can test in your build file.

like image 134
gareth_bowles Avatar answered Jan 17 '23 14:01

gareth_bowles