{"id":51359764,"url":"https://github.com/rudradave1/droidperf","last_synced_at":"2026-07-02T22:05:59.057Z","repository":{"id":351015257,"uuid":"1209156971","full_name":"rudradave1/droidperf","owner":"rudradave1","description":"CLI tool to audit and auto-fix Android Gradle performance issues. It detects bottlenecks, suggests optimizations, and supports CI workflows for Android/KMP + Flutter projects.","archived":false,"fork":false,"pushed_at":"2026-05-06T08:43:21.000Z","size":332,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-06T10:42:06.764Z","etag":null,"topics":["android","build-tools","ci","cli","developer-productivity","flutter","gradle","kmp","kotlin","performance"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/droidperf","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rudradave1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-13T06:36:15.000Z","updated_at":"2026-05-06T08:43:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rudradave1/droidperf","commit_stats":null,"previous_names":["rudradave1/droidperf"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/rudradave1/droidperf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudradave1%2Fdroidperf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudradave1%2Fdroidperf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudradave1%2Fdroidperf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudradave1%2Fdroidperf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rudradave1","download_url":"https://codeload.github.com/rudradave1/droidperf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rudradave1%2Fdroidperf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35064291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","build-tools","ci","cli","developer-productivity","flutter","gradle","kmp","kotlin","performance"],"created_at":"2026-07-02T22:05:58.037Z","updated_at":"2026-07-02T22:05:59.040Z","avatar_url":"https://github.com/rudradave1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# droidperf\n\n[![npm](https://img.shields.io/npm/v/droidperf)](https://www.npmjs.com/package/droidperf)\n[![CI](https://github.com/rudradave1/droidperf/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/rudradave1/droidperf/actions/workflows/ci.yml)\n[![license](https://img.shields.io/npm/l/droidperf)](./LICENSE)\n\nAndroid Gradle performance auditor and auto-fixer.\n\nAudit and safely fix common Gradle build-time misconfigurations in Android projects.\n\n## What's new in 2.1\n- **Smart Log Pre-processing**: Extracts the slowest tasks and key metrics to fit any build size into the LLM context.\n- **Expert Knowledge Base (RAG)**: Automatically injects relevant Gradle performance patterns into the AI prompt for deeper insights.\n- **Improved Accuracy**: More structured, data-driven analysis with lower token usage.\n\n## What's new in 2.0\n- **AI-powered build analysis** via LLM (`npx droidperf analyze`)\n- **Auto-apply fixes** with `--apply`\n- **Dry-run preview** for AI fixes with `--dry-run`\n- **Save report** to `droidperf-report.md` for team sharing\n\nIt’s designed to be boring in the best way: conservative fixes, transparent diffs, and easy rollback.\n\n## Design Philosophy\n\n- Prefer safe, reversible fixes over aggressive optimizations\n- Avoid modifying build scripts directly (only gradle.properties)\n- Focus on high-impact, low-risk improvements first\n  \n## Demo\n\n### 1. Analyze your build\n```bash\nnpx droidperf analyze --build-log ./build.log\n```\n\n### 2. Preview fixes before applying\n```bash\nnpx droidperf analyze --build-log ./build.log --apply --dry-run\n```\n\n### 3. Apply fixes automatically\n```bash\nnpx droidperf analyze --build-log ./build.log --apply\n```\n\n## Quickstart\n\n```bash\nnpx droidperf audit /path/to/your/android/project\nnpx droidperf fix /path/to/your/android/project --dry-run\nnpx droidperf fix /path/to/your/android/project\n```\n\nFlutter repo? Point at the repo root — `droidperf` will auto-detect and audit the `android/` Gradle subproject.\n\n## One-pager\n\nIf you want a short “why/what/how” you can share, see [`docs/ONE_PAGER.md`](./docs/ONE_PAGER.md).\n\n## Example output\n\n```text\nScanning your Android project...\n\nFound 7 issues costing you ~3.0 minutes per build:\n\n[CRITICAL] Configuration cache disabled — +45s per build\n[CRITICAL] Build cache disabled — +32s per build\n[HIGH]     Parallel execution disabled — +38s per build\n[HIGH]     Kotlin incremental disabled — +28s per build\n[MEDIUM]   JVM heap too low — 2048mb — recommend 4096mb\n[MEDIUM]   Configure on demand disabled — +12s per build\n[LOW]      Gradle daemon disabled — +8s per build\n\nEstimated waste: 3.0 min/build × 20 builds/day = 61 min/day\n\nRun 'droidperf fix' to apply all fixes automatically.\n```\n\nPreview changes safely first:\n\n```bash\nnpx droidperf fix /path/to/your/android/project --dry-run\n```\n\n`--dry-run` prints a full-file unified diff for every changed file, so you can see exactly what would be written.\n\n## What the community found\n\nReal results shared by people running `droidperf`:\n\n- **Rudra Dave (maintainer)**: **1.3 min/build saved** on a real project run.\n\nCommunity-driven latest updates:\n\n- Exact `--dry-run` output now shows full-file diffs of what will be written.\n- Added support for `kotlin.incremental.useClasspathSnapshot=true`.\n\n## What it checks\n\n- Configuration cache disabled (CRITICAL)\n- Build cache disabled (CRITICAL)\n- Parallel execution disabled (HIGH)\n- Kotlin incremental disabled (HIGH)\n- JVM heap too low (MEDIUM)\n- Configure on demand disabled (MEDIUM)\n- Gradle daemon disabled (LOW)\n- Dynamic dependency versions (LOW, audit-only; scans `build.gradle*` and `gradle/libs.versions.toml`)\n\n## Usage\n\n- **Audit**:\n\n```bash\nnpx droidperf audit /path/to/your/android/project\n```\n\n- **Config (optional)**: add `.droidperfrc.json` (or `droidperf.config.json`) at the project root.\n\n```json\n{\n  \"buildsPerDay\": 20,\n  \"recommend\": { \"jvmXmxMb\": 4096 },\n  \"rules\": {\n    \"enabled\": {\n      \"configure-on-demand\": false\n    }\n  }\n}\n```\n\nYou can also pass it explicitly:\n\n```bash\nnpx droidperf audit /path/to/project --config /path/to/.droidperfrc.json\n```\n\n- **List rules** (IDs, severity, estimated savings, autofix availability):\n\n```bash\nnpx droidperf audit --list-rules\n```\n\n- **Apply fixes**:\n\n```bash\nnpx droidperf fix /path/to/your/android/project\n```\n\n- **Preview changes (recommended first)**:\n\n```bash\nnpx droidperf fix /path/to/your/android/project --dry-run\n```\n\n- **Apply only some rules**:\n\n```bash\nnpx droidperf fix /path/to/your/android/project --only configuration-cache,build-cache --dry-run\nnpx droidperf fix /path/to/your/android/project --exclude jvm-heap\n```\n\n- **LLM Build Analysis (Beta)**:\n  Analyze a Gradle build log to find bottlenecks using an LLM.\n\n```bash\n# Set key once\nnpx droidperf config --set-key your-key\n\n# Run analysis (auto-detects build.log)\nnpx droidperf analyze\n\n# Run analysis and apply recommended fixes automatically\nnpx droidperf analyze --apply\n\n# Use a specific model\nnpx droidperf analyze --model openai/gpt-4o\n```\n\n- **Machine-readable output (CI)**:\n\n```bash\nnpx droidperf audit /path/to/your/android/project --json\nnpx droidperf fix /path/to/your/android/project --dry-run --json\n```\n\n## Safety\n\nBefore writing, `droidperf fix` saves a timestamped backup to `.droidperf-backup/`.\n\nExample restore:\n\n```bash\ncp .droidperf-backup/gradle.properties.\u003ctimestamp\u003e.bak gradle.properties\n```\n\n## What it changes\n\n`droidperf fix` only applies safe edits to `gradle.properties`:\n\n- `org.gradle.configuration-cache=true`\n- `org.gradle.caching=true`\n- `org.gradle.parallel=true`\n- `kotlin.incremental=true`\n- `kotlin.incremental.useClasspathSnapshot=true`\n- `org.gradle.configureondemand=true`\n- `org.gradle.daemon=true`\n- `org.gradle.jvmargs`: updates/sets `-Xmx` (4096m) and ensures `-Dfile.encoding=UTF-8` **without deleting your existing JVM args flags**\n\nDynamic dependency versions are reported but not auto-fixed.\n\n## Notes\n\n- **Supported**: Android Gradle projects (Groovy + Kotlin DSL), KMP (Gradle-based), version catalogs, composite builds (`includeBuild(...)` best-effort), and Flutter’s Android module (auto-detects `android/`).\n- **Guardrails**: very large files are skipped to keep scans fast and predictable.\n\n## Output formats\n\n- `--no-color`: disable ANSI colors (CI-friendly)\n- `--json`: machine-readable output for audits/fixes\n\n## Changelog\n\nSee [`CHANGELOG.md`](./CHANGELOG.md).\n\n## Contributing\n\nSee [`CONTRIBUTING.md`](./CONTRIBUTING.md).\n\n## Security\n\nSee [`SECURITY.md`](./SECURITY.md).\n\n## Roadmap\n\nSee the [upcoming features](https://github.com/rudradave1/droidperf/issues):\n- **Local LLM Support**: Integration with Ollama for offline analysis.\n- **Visual Timelines**: Mermaid.js charts generated from build logs.\n- **Project Structure Analysis**: Deep scan of `build.gradle` files to suggest modularization.\n\n## Maintainer\n\nMaintained by **Rudra Dave**.\n\nBuilt by a senior Android/KMP engineer.\nOpen to remote roles → [github.com/rudradave1](https://github.com/rudradave1)\n\n- **Issues**: use GitHub Issues for bugs/features\n- **Security**: see [`SECURITY.md`](./SECURITY.md)\n- **Contact**: `rudramordan@gmail.com`\n- **Updates**: `https://www.linkedin.com/in/rudradave/`\n\n## Local development\n\n```bash\nnpm install\nnode bin/droidperf.js audit --path /path/to/android/project --no-color\nnode bin/droidperf.js fix --path /path/to/android/project --dry-run --no-color\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frudradave1%2Fdroidperf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frudradave1%2Fdroidperf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frudradave1%2Fdroidperf/lists"}