android_packages_modules_Co.../thread/scripts/make-pretty.sh
Kangping Dong c73dd5aa23 [Thread] add Android.bp format to make-pretty.sh
There are sometimes gerrit warnings on Android.bp file format:
```
Analyzer Description: Formats Android.bp files.
Owner: soong-team@google.com

This file is not formatted.

Run prebuilts/build-tools/linux-x86/bin/bpfmt -w {filename} to format the file, or apply the suggested fix.
```

This commit adds the suggested format script to make-pretty.sh to avoid
the warning.

Change-Id: I8a691b1e6af873e8c43e34ed3168203d469eee1c
2024-01-28 13:14:46 +08:00

9 lines
425 B
Shell
Executable file

#!/usr/bin/env bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
GOOGLE_JAVA_FORMAT=$SCRIPT_DIR/../../../../../prebuilts/tools/common/google-java-format/google-java-format
ANDROID_BP_FORMAT=$SCRIPT_DIR/../../../../../prebuilts/build-tools/linux-x86/bin/bpfmt
$GOOGLE_JAVA_FORMAT --aosp -i $(find $SCRIPT_DIR/../ -name "*.java")
$ANDROID_BP_FORMAT -w $(find $SCRIPT_DIR/../ -name "*.bp")