No issue: move kotlin-allopen outside appVariants loop.

The kotlin-allopen plugin could be getting applied for each variant we
have in the app. With the changed code, it will only get applied once.
upstream-sync
Michael Comella 3 years ago committed by mergify[bot]
parent ea56dd216b
commit 667ef89220

@ -226,19 +226,19 @@ android {
}
}
android.applicationVariants.all { variant ->
// -------------------------------------------------------------------------------------------------
// Set up kotlin-allopen plugin for writing tests
// -------------------------------------------------------------------------------------------------
boolean hasTest = gradle.startParameter.taskNames.find { it.contains("test") || it.contains("Test") } != null
if (hasTest) {
apply plugin: 'kotlin-allopen'
allOpen {
annotation("org.mozilla.fenix.utils.OpenClass")
}
boolean hasTest = gradle.startParameter.taskNames.find { it.contains("test") || it.contains("Test") } != null
if (hasTest) {
apply plugin: 'kotlin-allopen'
allOpen {
annotation("org.mozilla.fenix.utils.OpenClass")
}
}
android.applicationVariants.all { variant ->
// -------------------------------------------------------------------------------------------------
// Generate version codes for builds

Loading…
Cancel
Save