Multiple Lint Files For Each Build Type

190 views Asked by At

How would one configure gradle to point to different lint files for different build types?

We want to translate strings at the end of a development cycle. So we need to ignore translation errors thrown by lint only on the debug version. When we make a release build lint should then throw the translations errors. The following build.gradle throws a DSL method not found.

  android {

    buildTypes {

        release {
            signingConfig signingConfigs.release
        }

        debug {
            testCoverageEnabled = true
            applicationIdSuffix '.debug'
            versionNameSuffix '-DEBUG'
            signingConfig signingConfigs.debug
            lintOptions debug
        }

        beta {
            applicationIdSuffix '.beta'
            versionNameSuffix '- beta'
            signingConfig signingConfigs.debug
        }
    }

    lintOptions {

        debug {
            disable 'TypographyFractions'
        }

    }

}
0

There are 0 answers