Files
sousa-gecko/mobile/android/android-components/common-config.gradle
T
Ryan VanderMeulen ec87c46a0c Bug 2046159 - Use proguard-android-optimize.txt for the default ProGuard rules. r=android-reviewers,adhingra
AGP 9 disallows getDefaultProguardFile('proguard-android.txt') because it bundles -dontoptimize. Switch
to the -optimize variant, which is already valid on the current AGP 8.13 and behavior-neutral for these
modules (none enable minification).

Differential Revision: https://phabricator.services.mozilla.com/D305683
2026-06-10 03:15:37 +00:00

38 lines
1.5 KiB
Groovy

android {
buildTypes {
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileSdk { version = release(config.compileSdkMajorVersion) { minorApiLevel = config.compileSdkMinorVersion } }
defaultConfig {
minSdk config.minSdkVersion
targetSdk config.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lint {
warningsAsErrors = true
abortOnError = false
// With our L10N process its totally possible to have missing or (temporarily) extra translations.
disable 'MissingTranslation',
'ExtraTranslation',
'MissingDefaultResource',
// We do not want to enforce this as a generic rule for all languages (see #6117, #6056, #6118)
'TypographyEllipsis',
// https://github.com/mozilla-mobile/android-components/issues/10641
'UnspecifiedImmutableFlag',
// https://bugzilla.mozilla.org/show_bug.cgi?id=1795427
'UnusedResources',
// "We do not impose rules on locales"
// https://github.com/mozilla-mobile/android-components/pull/11069
'TypographyDashes'
sarifReport = true
sarifOutput = file("../../../build/reports/lint/lint-report-${project.name}.sarif.json")
}
}