Enforce consistent formatting of .bp files

Test: attempt to checking in badly formatted .bp file
Change-Id: I38bdbb478cf3d2ee2e724b7d73000a000e9a6e5c
diff --git a/Android.bp b/Android.bp
index f5a07b4..dd5603c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -67,7 +67,7 @@
     export_include_dirs: [
         "include",
         "header_only_include",
-        "platform_include"
+        "platform_include",
     ],
     stubs: {
         symbol_file: "libnativehelper.map.txt",
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
new file mode 100644
index 0000000..321bab6
--- /dev/null
+++ b/PREUPLOAD.cfg
@@ -0,0 +1,2 @@
+[Builtin Hooks]
+bpfmt = true
diff --git a/tests/Android.bp b/tests/Android.bp
index 8bbeed7..c796eb9 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -5,7 +5,10 @@
     test_suites: ["device-tests"],
     host_supported: true,
     srcs: ["JniInvocation_test.cpp"],
-    cflags: ["-Wall", "-Werror"],
+    cflags: [
+        "-Wall",
+        "-Werror",
+    ],
     // Link to the non-stub version of the library to access some internal
     // functions.
     bootstrap: true,
@@ -13,62 +16,65 @@
 }
 
 cc_test {
-  name: "JniSafeRegisterNativeMethods_test",
-  host_supported: true,
-  srcs: ["JniSafeRegisterNativeMethods_test.cpp"],
+    name: "JniSafeRegisterNativeMethods_test",
+    host_supported: true,
+    srcs: ["JniSafeRegisterNativeMethods_test.cpp"],
 
-  cflags: [
-      // Base set of cflags used by all things ART.
-      "-fno-rtti",
-      "-ggdb3",
-      "-Wall",
-      "-Werror",
-      "-Wextra",
-      "-Wstrict-aliasing",
-      "-fstrict-aliasing",
-      "-Wunreachable-code",
-      "-Wredundant-decls",
-      "-Wshadow",
-      "-Wunused",
-      "-fvisibility=protected",
+    cflags: [
+        // Base set of cflags used by all things ART.
+        "-fno-rtti",
+        "-ggdb3",
+        "-Wall",
+        "-Werror",
+        "-Wextra",
+        "-Wstrict-aliasing",
+        "-fstrict-aliasing",
+        "-Wunreachable-code",
+        "-Wredundant-decls",
+        "-Wshadow",
+        "-Wunused",
+        "-fvisibility=protected",
 
-      // Warn about thread safety violations with clang.
-      "-Wthread-safety",
-      "-Wthread-safety-negative",
+        // Warn about thread safety violations with clang.
+        "-Wthread-safety",
+        "-Wthread-safety-negative",
 
-      // Warn if switch fallthroughs aren't annotated.
-      "-Wimplicit-fallthrough",
+        // Warn if switch fallthroughs aren't annotated.
+        "-Wimplicit-fallthrough",
 
-      // Enable float equality warnings.
-      "-Wfloat-equal",
+        // Enable float equality warnings.
+        "-Wfloat-equal",
 
-      // Enable warning of converting ints to void*.
-      "-Wint-to-void-pointer-cast",
+        // Enable warning of converting ints to void*.
+        "-Wint-to-void-pointer-cast",
 
-      // Enable warning of wrong unused annotations.
-      "-Wused-but-marked-unused",
+        // Enable warning of wrong unused annotations.
+        "-Wused-but-marked-unused",
 
-      // Enable warning for deprecated language features.
-      "-Wdeprecated",
+        // Enable warning for deprecated language features.
+        "-Wdeprecated",
 
-      // Enable warning for unreachable break & return.
-      "-Wunreachable-code-break",
-      "-Wunreachable-code-return",
+        // Enable warning for unreachable break & return.
+        "-Wunreachable-code-break",
+        "-Wunreachable-code-return",
 
-      // Enable thread annotations for std::mutex, etc.
-      "-D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS",
-  ],
+        // Enable thread annotations for std::mutex, etc.
+        "-D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS",
+    ],
 
-  tidy: true,
+    tidy: true,
 
-  shared_libs: ["libnativehelper"],
+    shared_libs: ["libnativehelper"],
 }
 
 cc_test {
-  name: "libnativehelper_api_test",
-  host_supported: true,
-  cflags: ["-Wall", "-Werror"],
-  srcs: ["libnativehelper_api_test.c"],  // C Compilation test.
-  tidy: true,
-  shared_libs: ["libnativehelper"],
+    name: "libnativehelper_api_test",
+    host_supported: true,
+    cflags: [
+        "-Wall",
+        "-Werror",
+    ],
+    srcs: ["libnativehelper_api_test.c"], // C Compilation test.
+    tidy: true,
+    shared_libs: ["libnativehelper"],
 }