diff --git a/java/README.md b/java/README.md index 9fea0517ae..bedd7a580f 100644 --- a/java/README.md +++ b/java/README.md @@ -23,10 +23,14 @@ If you are using Maven, use the following: com.google.protobuf protobuf-java - 4.27.0 + ``` +And **replace `` with a version from the +[Maven Protocol Buffers Repository](https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java).** +For example, `3.25.3`. + Make sure the version number of the runtime matches (or is newer than) the version number of the protoc. @@ -37,17 +41,10 @@ protobuf-java-util package: com.google.protobuf protobuf-java-util - 4.27.0 + ``` -### Gradle - -If you are using Gradle, add the following to your `build.gradle` file's -dependencies: `implementation 'com.google.protobuf:protobuf-java:4.27.0'` Again, -be sure to check that the version number matches (or is newer than) the version -number of protoc that you are using. - ### Use Java Protocol Buffers on Android For Android users, it's recommended to use protobuf Java Lite runtime because diff --git a/java/lite.md b/java/lite.md index bc2ebbdd66..729e7afd97 100644 --- a/java/lite.md +++ b/java/lite.md @@ -29,10 +29,14 @@ protobuf Java Lite runtime. If you are using Maven, include the following: com.google.protobuf protobuf-javalite - 4.27.0 + ``` +And **replace `` with a version from the +[Maven Protocol Buffers \[Lite\] Repository](https://mvnrepository.com/artifact/com.google.protobuf/protobuf-javalite).** +For example, `3.25.3`. + ## R8 rule to make production app builds work The Lite runtime internally uses reflection to avoid generating hashCode/equals/(de)serialization methods.