android_build_doctor 0.1.0
android_build_doctor: ^0.1.0 copied to clipboard
Flutter Android build doctor: checks Java/Gradle/AGP/Kotlin compatibility, audits every plugin for AGP 9 blockers, explains Gradle errors, applies safe fixes.
android_build_doctor examples #
Diagnose a project #
cd my_flutter_app
android_build_doctor check
Find which plugins block AGP 9 / built-in Kotlin #
android_build_doctor plugins
# AGP 9 + built-in Kotlin readiness: 37/40 plugins ready. Blockers: file_picker, geocoding, some_old_plugin.
Explain a failed build #
flutter build apk 2>&1 | android_build_doctor explain -
Preview and apply fixes #
android_build_doctor fix --dry-run # diff only
android_build_doctor fix # asks before writing, backs files up
android_build_doctor restore # undo
Plan an upgrade #
android_build_doctor --target 3.47.0 check
CI #
android_build_doctor check --ci --json > android-doctor.json
As a library #
import 'package:android_build_doctor/android_build_doctor.dart';
Future<void> main() async {
final matrix = await MatrixLoader().load(offline: true);
final snapshot = await ProjectDetector().detect('.', scanPlugins: true);
final ctx = RuleContext(snapshot: snapshot, matrix: matrix);
final findings = runRules([...projectRules, ...pluginRules], ctx);
for (final f in findings) {
print('${f.id} [${f.severity.label}] ${f.message} (${f.source})');
}
}