Unverified Commit 4b955e69 authored by Feng Xiao's avatar Feng Xiao Committed by GitHub

Merge pull request #5111 from kykrueger/master

Update README.md with gradle instructions for java
parents 5aeee3dc 21ebeed2
...@@ -13,7 +13,11 @@ generate Java code for your .proto files: ...@@ -13,7 +13,11 @@ generate Java code for your .proto files:
$ protoc --java_out=${OUTPUT_DIR} path/to/your/proto/file $ protoc --java_out=${OUTPUT_DIR} path/to/your/proto/file
Include the generated Java files in your project and add a dependency on the Include the generated Java files in your project and add a dependency on the
protobuf Java runtime. If you are using Maven, use the following: protobuf Java runtime.
### Maven
If you are using Maven, use the following:
```xml ```xml
<dependency> <dependency>
...@@ -37,6 +41,14 @@ protobuf-java-util package: ...@@ -37,6 +41,14 @@ protobuf-java-util package:
</dependency> </dependency>
``` ```
### Gradle
If you are using Gradle, add the following to your `build.gradle` file's dependencies:
```
compile 'com.google.protobuf:protobuf-java:3.6.1'
```
Again, be sure to check that the version number maches (or is newer than) the version number of protoc that you are using.
### Use Java Protocol Buffers on Android ### Use Java Protocol Buffers on Android
For Android users, it's recommended to use protobuf Java Lite runtime because For Android users, it's recommended to use protobuf Java Lite runtime because
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment