Monday, February 1, 2016

Android Gradle - build tips - Lint HTML layout

With the release of gradle 2.10 there is a nice feature of Lint check html reports.

Simply speaking, whenever you run a build, a nice formatted html report will be generated. It is a VERY nice touch to the lint xml reports and makes the report much more readable and hence more actionable. It will save you time and make your code more robust and stable.

This feature was contributed by Sebastian Schuberth .

To check it out do the following:

1. Download gradle 2.10 and extract it to the default Android Studio gradle directory.
It may be:
C:/Program Files/Android/Android Studio/gradle/gradle-2.10

2. locate the file gradle-wrapper.properties via Android Studio and change distributionUrl to: https\://services.gradle.org/distributions/gradle-2.10-all.zip

3. In Android Studio open File->Settings and change gradle location to the one you extracted the gradle 2.10 file.
Android studio - change gradle version

4. Open a terminal for the project folder (either by Android Studio terminal view or explicitly via command line tool) and type: gradlew {module.name}:build
Note: The parameter {module.name} is optional and intended for multi module project where you want to build certqin modules.

That's it.

After the build finishes, scroll via its output and you will see something similar to:
Wrote HTML report to file:///C:/dev/workspace/common/commonlibrary/build/outputs/lint-results.html
Wrote XML report to file:///C:/dev/workspace/common/commonlibrary/build/outputs/lint-results.xml

Open the html link and you would be pleasantly surprised.

Check it out:

Lint Html report - sample


IMHO, the generated report is visually better than the report being generated via Android Studio-> Code Inspection. It is very convenient to read the warnings/errors and correct.

Another advantage is that report will be generated on every build and not on demand.

Note:
The lint html report would be generated from command line and not via Android Studio default build.


Please include a link to the original post

35 comments :

  1. This comment has been removed by the author.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. If you have a website, adding a simple HTML form to your site, such as a feedback form, contact form, or other web form, can be a tough task. Freelancer In Hastings

    ReplyDelete
  4. This tutorial is precious for the HTML learners. It iss tempting to look at your renovation love what you have done like dissertation writing services. As well the Gradle works with the build toolkit to provide processes and configurable settings.

    ReplyDelete
  5. That is the reason you should choose a company that have previously developed such fast and cool Android applications. Otherwise, choosing a not-so-good Android development company can cost you much too.
    Game killer apk

    ReplyDelete
  6. Based on your requirement, you should hire an experienced Android app developer to create innovative applications for your company.
    Download Game Killer Apk

    ReplyDelete
  7. With more than 2.4 million applications and games at present recorded on Google Play it's turned out to be increasingly hard to emerge.read

    ReplyDelete

  8. Game Killer apk is an android application which helps you hack your favorite android games or applications without any issues.
    app like game killer

    ReplyDelete
  9. Game Guardian is an amazing game hack/alteration tool. Game guardian helps you modify money, HP, Sp and more aspects of the game.
    download Game Guardian

    ReplyDelete
  10. Several cell phone producers are incorporating the Android operating system into their cell phones. Here are some of the top Android phones on the market today.latest supersu download

    ReplyDelete
  11. Hello there! I just want to offer you a big thumbs up for your great info you have right here on this post. I'll be coming back to your web site for more soon.
    ipl auction 2018 live

    ReplyDelete
  12. Written an essay is not an easy task, it is very hard to provide a quality paper. We provide the best essay writing service apex essay https://www.apexessays.com/essay-writing-service/ get it now!

    ReplyDelete
  13. Brawl stars Android is a game where each player is ranked by level and their total number of trophies attained. The player will work towards collecting brawlers, one of which can be used in each game

    ReplyDelete
  14. I was just browsing through the internet looking for some information and came across your blog. Its opportunity are so fantastic and working style so speedy.

    IPL season 11 .

    ReplyDelete
  15. Gangstar Vegas is an open world action-adventure video game developed by Gameloft for Android, iOS.
    gangstar vegas apk obb

    ReplyDelete
  16. To get you started on your quest, here's ten of the best free brain and puzzle Android games. They're all put together very well and are going to be a lot of fun to play.
    Bullet Force Hack Online

    ReplyDelete
  17. Your new valuable key points imply much a person like me and extremely more to my office workers. With thanks.

    Informatica Online Training
    ETL Testing Online Training
    Hadoop online Training

    ReplyDelete
  18. What platform and theme are you using if I may ask? Where can I buy them? x
    download mobdro

    ReplyDelete
  19. I really like reading through a post that can make people think. Also, many thanks for permitting me to comment!
    ipl live streaming.

    ReplyDelete
  20. Thanks for taking the time to discuss this, I feel strongly about it and adore learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more details? It is extremely helpful for me.
    Brawl Stars Cheats

    ReplyDelete
  21. It has three simple steps to make Android application. First of all you have to choose an app then customize your content (text) of your choice and even pictures. Finally share it. ShowBox APK

    ReplyDelete
  22. Most of these games are available for free while others require you to purchase them. According to research, games are the most downloaded applications on Android platform. So far, users have downloaded hundreds of millions of games.fornite hack

    ReplyDelete
  23. This helpful free Android app also allows you to create and track your portfolio(s). While this app isn't going to blow anyone away by the dozens of additional features that you may or may not want.

    ReplyDelete
  24. Thank's for this great android app information.

    ReplyDelete
  25. This Word Counter application allows you to enter your text and get the count of words, characters with spaces and without spaces and number of lines of the given text. word counter android application

    ReplyDelete
  26. This site provide many types of preloaded categories like Trivia Game, Photo Gallery App, E-Book App which allows you easily create a perfect application according to your requirements. Web Development Company

    ReplyDelete
  27. It’s great to come across a blog every once in a while, that isn’t the same out of date rehashed material. Fantastic read.

    Android Training
    Android Training in Chennai

    ReplyDelete