Registry / devops / droidperf

droidperf

JSON →
library1.0.4jsnpmunverified

Android Gradle performance auditor and auto-fixer that scans projects for common build misconfigurations (e.g., disabled configuration cache, parallel execution, or low JVM heap) and applies safe, revertible edits. Version 1.0.4 is the latest stable release; the project follows a monthly release cadence with conservative fixes, transparent diffs via --dry-run, and timestamped backups. Unlike generic Gradle optimization guides, droidperf provides automated audit-to-fix workflows, machine-readable JSON output for CI, and rule-specific enable/disable configuration.

npm install droidperf
INSTALL
IMPORT
SIG · DROIDPERF
D
droidperf
devopsjavascriptv1.0.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default export
import droidperf from 'droidperf'
const droidperf = require('droidperf')
ESM-only since v1.0.0; CommonJS require() not supported.
runAudit
import { runAudit } from 'droidperf'
const { runAudit } = require('droidperf')
Named export for programmatic audit; only available in ESM.
runFix
import { runFix } from 'droidperf'
Named export for programmatic fix; requires options object with dryRun and rules.

Shows programmatic audit and fix workflow with dry-run support, using ESM imports and async/await.

import { runAudit, runFix } from 'droidperf'; async function main() { const projectPath = '/path/to/android/project'; // Audit const auditResult = await runAudit(projectPath); console.log(auditResult.issues); // Fix (dry run first) const dryFixResult = await runFix(projectPath, { dryRun: true }); console.log(dryFixResult.diffs); // Apply fixes await runFix(projectPath); } main().catch(console.error);
droidperf --version
Debug
Known issues
deprecatedv0.1.x API (CommonJS, default export as function) is deprecated; upgrade to v1.0.x ESM API.
fix
Update imports to ESM style: `import droidperf from 'droidperf'` or `import { runAudit } from 'droidperf'`.
affects: >=0.1.0 <1.0.0
breakingSwitched to ESM-only in v1.0.0; removed CommonJS support.
fix
Use `import` syntax or enable ESM in your project (e.g., `"type": "module"` in package.json).
affects: >=0.0.0 <1.0.0
gotchaRequires Node.js >=18; older versions will fail with syntax errors.
fix
Upgrade Node.js to 18 or later.
affects: >=1.0.0
gotchaThe `--json` flag outputs to stdout; do not mix with human-readable output in the same run.
fix
Use `--json` alone for machine-readable output; run separately from normal audit/fix.
affects: >=0.1.0
gotchaFixes are applied to `gradle.properties` only; other build files (e.g., build.gradle) are not modified.
fix
Manual changes may be needed for settings in build.gradle; droidperf only handles gradle.properties settings.
affects: >=1.0.0
Errors
Common errors & fixes
SyntaxError: Unexpected token 'export'
Running droidperf with CommonJS require() or Node.js <18.
fix
Use `import droidperf from 'droidperf'` and ensure Node.js >=18.
Error: ENOENT: no such file or directory, open '.../gradle.properties'
The specified project path does not contain gradle.properties or is not an Android project.
fix
Verify the project path points to an Android project root (where gradle.properties resides).
Error: Cannot find module 'droidperf'
droidperf not installed or not in node_modules.
fix
Install via `npm install droidperf --save-dev` and ensure node_modules is present.
TypeError: droidperf is not a function
Using default import incorrectly with CommonJS require() in v1.x.
fix
Use `import droidperf from 'droidperf'` or switch to named imports like `import { runAudit } from 'droidperf'`.
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
droidperf — npm install droidperf · libregistry