Configure the New Relic Gradle plugin

The New Relic Gradle plugin extension allows you to configure the behavior of plugin tasks executed during Gradle builds. Create a plugin extension in the build.gradle files that apply the New Relic plugin, then add any of the following configuration options:

Config option Description
variantMapsEnabled Generate unique build IDs for each app variant. Default: true
uploadMapsForVariant Specify which variant build types should report ProGuard maps to New Relic. Default: Release

Here are some simple examples showing how to apply plugin configuration options to the agent:

App-level build.gradle example

To configure the plugin with default values:

newrelic {
    // use a common buildId for all variants (default: true)
    variantMapsEnabled true

    // Tag and report Proguard maps for these build types (default: Release)
    uploadMapsForVariant 'Release'
}
Enable map uploads for multiple variants

Multiple build types can be specified, separated by commas:

newrelic {
    // default build types
    uploadMapsForVariant 'Release', 'Debug'
}
Disable map uploads

To disable map uploads entirely, use an empty string:

newrelic {
    // disable map uploads
    uploadMapsForVariant ''
}

For more help

If you need more help, check out these support and learning resources: