Add a workaround for wire plugin bug in benchmark.

Test: ./gradlew :benchmark:benchmark-common:build (twice)
      no more warnings
Change-Id: I73989af8633780451497d8a5e54f25ff2741d4b4
diff --git a/benchmark/benchmark-common/build.gradle b/benchmark/benchmark-common/build.gradle
index 47f2c19..cceacc9 100644
--- a/benchmark/benchmark-common/build.gradle
+++ b/benchmark/benchmark-common/build.gradle
@@ -78,3 +78,15 @@
         freeCompilerArgs += ["-Xopt-in=kotlin.Experimental"]
     }
 }
+
+// https://github.com/square/wire/issues/1947
+// Remove when we upgrade to fixed wire library
+afterEvaluate {
+    tasks.named("compileReleaseKotlin").configure {
+        it.dependsOn("generateDebugProtos")
+    }
+    tasks.named("compileDebugKotlin").configure {
+        it.dependsOn("generateReleaseProtos")
+    }
+}
+