Build-extras.gradle - overwrite or merge?

I recommend using build-extras.gradle against editing the generated build.gradle file if I want to make changes to the gradle settings.

This is normal. But I would like to know if the settings in build-extras.gradle settings in build.gradle or combined with the settings in build.gradle .

eg. if I have the following build.gradle file:

 android { lintOptions { checkReleaseBuilds false } applicationVariants.all { variant -> variant.outputs.each { output -> output.outputFile = new File( output.outputFile.parent, 'myApp' + manifestParser.getVersionName(android.sourceSets.main.manifest.srcFile) + "_" + getDate() + '.apk' ) } } sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] jniLibs.srcDirs = ['libs'] } } } 

If build-extras.gradle had the following:

 android { lintOptions: { checkDebugBuilds: false } } 

Will it essentially overwrite the checkReleaseBuilds option with build-extras.gradle , or will it combine the two?

I ask because I am trying to determine which of the following is necessary for build-extras.gradle :

A:

 android { lintOptions: { checkDebugBuilds: false } } 

IN:

 android { lintOptions: { checkDebugBuilds: false checkReleaseBuilds: true } } 

Thanks!

Edit: Formatted file names to make them easier to read.

+6
source share

All Articles