diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2018-09-07 12:06:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-07 12:06:48 -0700 |
commit | 4b955e69cf5d567c30181b533b9dced40214f37d (patch) | |
tree | c1076800a1ed92d8624006394a7de052f7dc146d | |
parent | 5aeee3dc910d37f37b75f5a6d1486fe75cb09284 (diff) | |
parent | 21ebeed20addd266f39a1660c0f5e2416fb1ec5e (diff) | |
download | protobuf-4b955e69cf5d567c30181b533b9dced40214f37d.tar.gz protobuf-4b955e69cf5d567c30181b533b9dced40214f37d.tar.bz2 protobuf-4b955e69cf5d567c30181b533b9dced40214f37d.zip |
Merge pull request #5111 from kykrueger/master
Update README.md with gradle instructions for java
-rw-r--r-- | java/README.md | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/java/README.md b/java/README.md index 476f6dc7..def4fd9a 100644 --- a/java/README.md +++ b/java/README.md @@ -13,7 +13,11 @@ generate Java code for your .proto files: $ protoc --java_out=${OUTPUT_DIR} path/to/your/proto/file 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 <dependency> @@ -37,6 +41,14 @@ protobuf-java-util package: </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 For Android users, it's recommended to use protobuf Java Lite runtime because |