Generate external annotations for the annotations library

Change-Id: Id2dab5d4e5e6830f20c17b9f0bbf43988650efaf
(cherry picked from commit 06d3a4598be64ce26140a7f507e3db8c3a7bda49)
diff --git a/annotations/build.gradle b/annotations/build.gradle
index 61d036b..d7e8532 100644
--- a/annotations/build.gradle
+++ b/annotations/build.gradle
@@ -72,9 +72,15 @@
     from               javadoc.destinationDir
 }
 
-// add javadoc/source jar tasks as artifacts
+task annotationsZip(type: Zip) {
+    classifier         'annotations'
+    from               'external-annotations'
+}
+
+// add javadoc/source/annotations jar tasks as artifacts
 artifacts {
     archives jar
     archives sourcesJar
     archives javadocJar
+    archives annotationsZip
 }
diff --git a/annotations/external-annotations/android/support/annotation/annotations.xml b/annotations/external-annotations/android/support/annotation/annotations.xml
new file mode 100644
index 0000000..284d0f4
--- /dev/null
+++ b/annotations/external-annotations/android/support/annotation/annotations.xml
@@ -0,0 +1,7 @@
+<root>
+    <item name="android.support.annotation.VisibleForTesting int otherwise()">
+        <annotation name="android.support.annotation.IntDef">
+            <val name="value" val="{android.support.annotation.VisibleForTesting.PRIVATE, android.support.annotation.VisibleForTesting.PACKAGE_PRIVATE, android.support.annotation.VisibleForTesting.PROTECTED, android.support.annotation.VisibleForTesting.NONE}" />
+        </annotation>
+    </item>
+</root>
\ No newline at end of file