From 6fc97afdfffa840599f89dd91c0559611685cce3 Mon Sep 17 00:00:00 2001 From: Joshua Kuestersteffen Date: Wed, 13 Mar 2024 09:16:33 -0500 Subject: [PATCH] Tweak linting setting in build.gradle to be closer to original --- build.gradle | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index e5278885..b33cf59b 100644 --- a/build.gradle +++ b/build.gradle @@ -168,6 +168,28 @@ android { } } + buildFeatures { + buildConfig true + } + + lint { + lintConfig = new File('config/lint.xml') + + disable 'UnusedResources' // linter can't handle static imports, so just skip this test + disable 'MissingTranslation' + disable 'StringFormatCount' + + warningsAsErrors true + + xmlReport false + + if (System.env.CI == 'true') { + abortOnError true + htmlReport false + textReport true + textOutput 'stdout' + } + } testOptions { unitTests { @@ -177,6 +199,7 @@ android { flavorDimensions 'brand' + namespace 'org.medicmobile.webapp.mobile' productFlavors { unbranded { // we will not create project-specific src directories @@ -407,15 +430,6 @@ android { universalApk false } } - namespace 'org.medicmobile.webapp.mobile' - lint { - disable 'UnusedResources', 'MissingTranslation', 'StringFormatCount' - warningsAsErrors true - xmlReport false - } - buildFeatures { - buildConfig true - } } dependencies {