Skip to content

dector/lampa

Repository files navigation

Warning

Pre-1.0 software: Lampa is currently in the early stages of development.

🚧 🚧 🚧

Expect frequent breaking changes (especially in CLI arguments), bugs, suboptimal code, and limited functionality.

But if you're feeling adventurous - feel free to try it, your feedback is highly appreciated! Please report any issues you encounter, and feel free to share your ideas in Discussions tab — though I can't guarantee immediate prioritization.

Lampa logo


Lastest GitHub Release

Updates on Mastodon

Lampa screenshot

Lampa

Contents

What is this

Lampa is a small tool that is useful for comparing two releases: it generates overview reports where you can detect changes to third-party dependencies that are added to the build.

Getting Started

Install

Download latest version from Releases page.

or

use mise:

mise use -g ubi:dector/lampa

or

for Linux/MacOS use Homebrew:

brew tap dector/lampa
brew install lampa

Runtime dependencies

Since we are using Gradle to build Android projects - single runtime dependency is Java.

How To Use

All commands are executed inside the root folder of Android project (unless you explicitly specify path to project).

Remember that you can always use lampa help if you forget something.

Generate JSON report for current version

You will need to use this report for comparative HTML report.

lampa collect

If program finished successfully - you can find report file report.lampa.json in the project folder.

Be aware that by-default program is not rewriting report if it exists. But you can opt-in for such behavior explicitly by adding --overwrite flag:

lampa collect --overwrite

Other useful flags are:

  • --project <project-dir> - specify path to project root explicitly.
  • --to-dir <out-dir> - change the location of the report(s).
  • --variant <gradle-variant> - specify custom build variant that you use in Gradle. Might be useful if you have flavors etc.
  • --format html/--format json,html - if you need only HTML report or both.
  • --file-name <report-file-name> - if you need to customize generated report filename (without extension).

Sample report.

Generate only HTML report for current version

lampa collect --format html

Sample report.

Generate comparative HTML report for two releases

First, you need to generate JSON report for release 1 (e.g. 1.json). Then, you need to generate JSON report for release 2 (e.g. 2.json).

After, you need to generate comparative report with lampa compare.

For example:

git checkout v0.28.0
lampa collect --to-dir build --file-name v0.28.0

git checkout v0.28.1
lampa collect --to-dir build --file-name v0.28.1

lampa compare build/v0.28.0.json build/v0.28.1.json build/diff.html

Sample report.

GitHub Action

GitHub Action:

dector/run-lampa@v1

You can use this GitHub Action to integrate Lampa into your CI/CD pipeline.

See detailed instructions on GitHub Marketplace.

Production-ready example workflow

Contributing

I will add this section latest. For now feel free to contact me directly or open new discussion.

Changelog

See CHANGELOG.md for a detailed history of changes.

License

Project is distributed under MIT License.

Protobuf schema from AOSP is covered by Apache2 license.

About

Build/Release inspector for Android projects

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •