marcoRS / lint-cleaner-plugin
posted
Category: Gradle Plugin
Minimum SDK Level: None (1 | 1.0)

Badge

View in Github Github project information
Starred: 614
Forks: 101
Watchers: 28
Open Issues: 9

Snapshot pictures

No snapshot for this library yet.

Description

Usage

Apply the plugin in your build.gradle:

buildscript {
  repositories {
    mavenCentral()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:0.12.+'
    classpath 'com.droidtitan:lint-cleaner-plugin:0.3.0'
  }
}

apply plugin: 'android'
apply plugin: 'com.droidtitan.lintcleaner'

Finally, to remove unused resources use:

gradle lintClean

Optional Configuration using DSL

lintCleaner {
    // Exclude specific files
    exclude = ['com_crashlytics_export_strings.xml','config.xml']

    // Ability to ignore all resource files. False by default. 
    ignoreResFiles = true

    // Default path is build/outputs/lint-results.xml
    lintXmlFilePath = 'path/to/lint-results.xml'
}