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
9 lines
425 B
Shell
Executable file
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")
|