How can I use the jenkins android lint plugin in my android project ,what can I write in bulid.xml?

1.6k views Asked by At

I want to use the jenkins android lint plugin in my android project , but I don't know what can I do , something write in android project build.xml? please help me .

1

There are 1 answers

0
Christopher Orr On

You need to tell Jenkins to run Lint for you, to produce an XML results file for the Android Lint Plugin to read.

Gradle

If you're using the Android Gradle build system, you can upgrade to plugin version 0.7 (or newer), which has Lint integration built in.

Just run the "lint" Gradle task during your Jenkins build.

Ant

Since it sounds like you're using Ant, you will have to run the Lint command yourself during your Jenkins build.

You can add an "Execute shell" build step to your Jenkins job, or the equivalent type of build step if you're Windows, where you run a command like:
lint --xml --fullpath lint-results.xml .


These requirements and examples are documented on the wiki page for the Jenkins plugin.