Ignoring library project with Android lint on the command line

匆匆过客 提交于 2019-12-01 18:23:03
coffeebreaks

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?

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.

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>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!