Update google-java-format to 1.2-SNAPSHOT.

This brings support for Javadoc formatting and other bug fixes. We use
a snapshot because the --skip-sorting-imports flag was just recently
added, but is important for the formatter to be useful in the AOSP
codebase as the AOSP import style differs from the google style.
(Otherwise, apart from indenting, which already can be controlled with
the --aosp flag, the styles are effectively consistent).

For now, keep the old 1.0 .jar around, as there are some scripts which
depend on the exact path to it. It will be removed once those scripts
are updated or deleted.

Bug: 31552314
Test: Verified with local repository
Change-Id: I9e93194f785766fcb0d73a2586201c8a0aae1f1d
diff --git a/common/google-java-format/PREBUILT b/common/google-java-format/PREBUILT
index e57b6dd..098ce88 100644
--- a/common/google-java-format/PREBUILT
+++ b/common/google-java-format/PREBUILT
@@ -6,9 +6,18 @@
 
 https://github.com/google/google-java-format/releases
 
+or for snapshots:
+
+https://oss.sonatype.org/content/repositories/snapshots/com/google/googlejavaformat/google-java-format/
+
 google-java-format-1.0-all-deps.jar was built from SHA-1:
 f8a2688f012bbc10f30cce5234d1b5370f4a4865
 with tag google-java-format-1.0
 
+google-java-format-all-deps.jar was built from SHA-1:
+7e2e9c57d275124b2c6b530fa79532cd409355a7
+and fetched from snapshot:
+https://oss.sonatype.org/content/repositories/snapshots/com/google/googlejavaformat/google-java-format/1.2-SNAPSHOT/google-java-format-1.2-20161215.234410-25-all-deps.jar
+
 google-java-format-diff.py was fetched at SHA-1:
-ba6bd8c12d63f60450fcc6ec41acb0d2e63acb64
+cfd66b25558271f0a53bbeaf5b44aac49a12fa76
diff --git a/common/google-java-format/google-java-format b/common/google-java-format/google-java-format
index ce6e42b..1443adc 100755
--- a/common/google-java-format/google-java-format
+++ b/common/google-java-format/google-java-format
@@ -1,2 +1,2 @@
 #!/bin/bash
-java -jar `dirname "$0"`/google-java-format-1.0-all-deps.jar "$@"
+java -jar `dirname "$0"`/google-java-format-all-deps.jar "$@"
diff --git a/common/google-java-format/google-java-format-all-deps.jar b/common/google-java-format/google-java-format-all-deps.jar
new file mode 100644
index 0000000..ae4de7a
--- /dev/null
+++ b/common/google-java-format/google-java-format-all-deps.jar
Binary files differ
diff --git a/common/google-java-format/google-java-format-diff.py b/common/google-java-format/google-java-format-diff.py
index 8e9c803..8d74e15 100755
--- a/common/google-java-format/google-java-format-diff.py
+++ b/common/google-java-format/google-java-format-diff.py
@@ -53,6 +53,8 @@
                       help='be more verbose, ineffective without -i')
   parser.add_argument('-a', '--aosp', action='store_true',
                       help='use AOSP style instead of Google Style (4-space indentation)')
+  parser.add_argument('--skip-sorting-imports', action='store_true',
+                      help='do not fix the import order')
   args = parser.parse_args()
 
   # Extract changed lines for each file.
@@ -94,6 +96,8 @@
       command.append('-i')
     if args.aosp:
       command.append('--aosp')
+    if args.skip_sorting_imports:
+      command.append('--skip-sorting-imports')
     command.extend(lines)
     command.append(filename)
     p = subprocess.Popen(command, stdout=subprocess.PIPE,