Add a simple Proguard comaptibility tool

The tool will just read all proguard options from the command line and
place them into a Proguard configuration file. Then run R8 with that
file as the main Proguard configuration file.

Change-Id: Ia110e01db64543fa65a39aa0df7c77de2bd5d9a6
diff --git a/build.gradle b/build.gradle
index 7362238..b69be1f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -379,6 +379,20 @@
     }
 }
 
+task CompatProguard(type: Jar) {
+    from sourceSets.main.output
+    baseName 'compatproguard'
+    manifest {
+        attributes 'Main-Class': 'com.android.tools.r8.compatproguard.CompatProguard'
+    }
+    // In order to build without dependencies, pass the exclude_deps property using:
+    // gradle -Pexclude_deps CompatProguard
+    if (!project.hasProperty('exclude_deps')) {
+        // Also include dependencies
+        from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
+    }
+}
+
 task D8Logger(type: Jar) {
     from sourceSets.main.output
     baseName 'd8logger'