buildTypes {
debug {
**debuggable true**
}
release {
minifyEnabled enableProguardInReleaseBuilds
signingConfig signingConfigs.release
**debuggable false**
}
stagingRelease {
minifyEnabled false
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-
rules.pro"
signingConfig signingConfigs.release
**debuggable false**
jniDebuggable false
}
InternalRelease {
initWith productionRelease
applicationIdSuffix ".private"
}
}
There are BuildType (above is content of one file in project) and in stagingRelease build type I wanted to make debuggable true when parameter is checked. So basically it's a file content change requirement. How do I fullfill it using jenkinspipeline or Jenkins job or some plugin, which finds some particular pattern of 3-4 lines and replace those 3-4?
Please provide some example through shell script or pipeline script(groovy) or python, or some links will really helpful.
stagingRelease {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
debuggable false // ***This should turn true, when I check flag in jenkins parameter.***
jniDebuggable false
}