From 5ccdc684087c9eb335f43396f3dad9f536130abf Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 19 Dec 2022 15:46:44 +0100 Subject: [PATCH] define "full" and "debug" as the default build flavors Running standard tasks like `gradle test` was only running the lint and test for the basic flavor, when really, the full flavor should always take precedence. If you look at: https://gitlab.com/fdroid/fdroidclient/-/jobs/3495360444 You can see that app:lintBasicDebug gets run, but app:lintFullDebug does not. Unfortunately, Gradle just alpha-sorts flavors by default to set priority. --- .gitlab-ci.yml | 1 + app/build.gradle | 2 ++ app/lint.xml | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 293338c80..2bbe2f560 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,6 +60,7 @@ test_lint_pmd_checkstyle: script: # always report on lint errors to the build log - sed -i -e 's,textReport .*,textReport true,' app/build.gradle + # the tasks "lint", "test", etc don't always include everything - ./gradlew lint pmd checkstyle ktlintCheck testDebugUnitTest testFullDebugUnitTest tools scripts: diff --git a/app/build.gradle b/app/build.gradle index 0488dd37e..834dcf050 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -62,6 +62,7 @@ android { testProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'src/androidTest/proguard-rules.pro' } debug { + getIsDefault().set(true) manifestPlaceholders = [ applicationLabel: APP_NAME_DEBUG ] applicationIdSuffix ".debug" resValue "string", "applicationId", fullApplicationId + applicationIdSuffix @@ -75,6 +76,7 @@ android { flavorDimensions "base" productFlavors { full { + getIsDefault().set(true) dimension "base" applicationId fullApplicationId resValue "string", "applicationId", fullApplicationId diff --git a/app/lint.xml b/app/lint.xml index ef4419ea8..68735c5b6 100644 --- a/app/lint.xml +++ b/app/lint.xml @@ -3,6 +3,12 @@ + + + + + +