Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 4.25 KB

File metadata and controls

69 lines (47 loc) · 4.25 KB

Android Lint

Step changelog

Runs Lint on your Android project source files and detects potential syntax errors to keep your code error free.

Description

It highlights the code line where the error is found, explains the type of error and suggests corrections. The Step does not make the build fail if it spots any structural errors in your code. If you have inserted the Deploy to Bitrise.io Step in the Workflow, the tes results will be available in a viewable or downloadable Lint Report HTML or XML file which you can access on the Build's APPS & ARTIFACTS page.

Configuring the Step

  1. Set the Project Location input which, by default, points to the root directory of your Android project.
  2. Set the module and variant you wish to lint in the Module and Variant fields.

Optionally, you can modify these inputs:

  1. You can specify where the Lint reports should be found once the Step has run if you overwrite the Report location pattern input.
  2. You can set if the Step should cache build outputs and dependencies, only the dependencies or nothing at all in the Set level of cache input.
  3. You can set any gradle argument to the gradle task in the Additional Gradle Arguments input.

Troubleshooting

Make sure you insert the Step before a build Step. Make sure you type the correct module and variant names in the respective fields of the Step. If you are unsure about the exact names, you can check them in the Project Structure dialog of your project in Android Studio.

Useful links

Related Steps

🧩 Get started

Add this step directly to your workflow in the Bitrise Workflow Editor.

You can also run this step directly with Bitrise CLI.

⚙️ Configuration

Inputs
Key Description Flags Default
project_location The root directory of your android project, for example, where your root build gradle file exists (also gradlew, settings.gradle, etc...) required $BITRISE_SOURCE_DIR
module Set the module that you want to lint. To see your available modules please open your project in Android Studio and go in [Project Structure] and see the list on the left.
variant Set the variant that you want to lint. To see your available variants please open your project in Android Studio and go in [Project Structure] -> variants section.
report_path_pattern Will find the report file with the given pattern. If you need the xml file then you can use: "/build/reports/lint-results.xml" required */build/reports/lint-results*.html
cache_level all - will cache build cache and dependencies only_deps - will cache dependencies only none - will not cache anything required only_deps
arguments Extra arguments passed to the gradle task
Outputs There are no outputs defined in this step

🙋 Contributing

We welcome pull requests and issues against this repository.

For pull requests, work on your changes in a forked repository and use the Bitrise CLI to run step tests locally.

Learn more about developing steps: