Point to released versions in Java Protobuf (lite) READMEs instead of the the next, unreleased version.

https://github.com/protocolbuffers/protobuf/issues/15878

PiperOrigin-RevId: 609488730
pull/15912/head
Protobuf Team Bot 9 months ago committed by Copybara-Service
parent 0fa67a94aa
commit 5d876c9fec
  1. 15
      java/README.md
  2. 6
      java/lite.md

@ -23,10 +23,14 @@ If you are using Maven, use the following:
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>4.27.0</version>
<version><!--version--></version>
</dependency>
```
And **replace `<!--version-->` 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:
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>4.27.0</version>
<version><!--version--></version>
</dependency>
```
### 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

@ -29,10 +29,14 @@ protobuf Java Lite runtime. If you are using Maven, include the following:
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-javalite</artifactId>
<version>4.27.0</version>
<version><!--version--></version>
</dependency>
```
And **replace `<!--version-->` 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.

Loading…
Cancel
Save