Ignoring library project with Android lint on the command line

后端 未结 3 1970
逝去的感伤
逝去的感伤 2021-01-20 01:31

I am using Android lint with Jenkins and need to ignore library projects (specifically Action Bar Sherlock) that my team does not modify so that we can get useful results fr

相关标签:
3条回答
  • 2021-01-20 01:44

    I would first try to compare the lint configuration files when modified by eclipse to see if you find out what eclipse does. Maybe there's a way to modify the lint.xml file see to achieve what you want this or that

    In other words, backup your project, modify your eclipse config, save and compare with backup.

    Here's a modified lint.xml that could be useful for your particular case, but it looks like it was done manually.

    If you don't find anything useful, an alternative solution is to filter out the logs coming those paths:

    Android Lint report for my project only, excluding library projects?

    0 讨论(0)
  • 2021-01-20 01:49

    This is how I do it with Jenkins and Gradle:

    • Configure the Jenkins post-build action "Publish Android Lint Results" to pick up only the lint-results.xml of the main project. The default is **/lint-results.xml and includes lint results of library projects.
    • Set abortOnError false in the build.gradle file in library projects to ignore lint errors there.
    0 讨论(0)
  • 2021-01-20 01:51

    Put this in lint.xml in project root directory:

    <?xml version="1.0" encoding="UTF-8"?>
    <lint>
        <issue id="all">
            <ignore path="path_to_library/**" />
        </issue>
    </lint>
    
    0 讨论(0)
提交回复
热议问题