Unify uses of protobuf across libraries

Several libraries were on an older version of protobuf that does
not work on Mac ARM64 machines.

Test: ./gradlew tasks
Bug: 221961642
Change-Id: Idf0155b321a9e87b7bc65e2e373b3c97f74ce8b9
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index d4127fd..efb333d 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -38,6 +38,7 @@
 ktlint = "0.43.0"
 leakcanary = "2.7"
 mockito = "2.25.0"
+protobuf = "3.19.4"
 skiko = "0.7.7"
 sqldelight = "1.3.0"
 wire = "3.6.0"
@@ -147,10 +148,10 @@
 playServicesBase = { module = "com.google.android.gms:play-services-base", version = "17.0.0" }
 playServicesBasement = { module = "com.google.android.gms:play-services-basement", version = "17.0.0" }
 playServicesWearable = { module = "com.google.android.gms:play-services-wearable", version = "17.1.0" }
-protobuf = { module = "com.google.protobuf:protobuf-java", version = "3.4.0" }
-protobufCompiler = { module = "com.google.protobuf:protoc", version = "3.19.4" }
+protobuf = { module = "com.google.protobuf:protobuf-java", version.ref = "protobuf" }
+protobufCompiler = { module = "com.google.protobuf:protoc", version.ref = "protobuf" }
 protobufGradlePluginz = { module = "com.google.protobuf:protobuf-gradle-plugin", version = "0.8.18" }
-protobufLite = { module = "com.google.protobuf:protobuf-javalite", version = "3.19.4" }
+protobufLite = { module = "com.google.protobuf:protobuf-javalite", version.ref = "protobuf" }
 reactiveStreams = { module = "org.reactivestreams:reactive-streams", version = "1.0.0" }
 retrofit = { module = "com.squareup.retrofit2:retrofit", version = "2.7.2" }
 robolectric = { module = "org.robolectric:robolectric", version = "4.7.3" }