How to generate a .proto file with Wire without using Maven?

404 views Asked by At

For a project I've been using the Google protocol buffers, but now I want to switch to Wire. I want to compile my .proto file using the terminal like this

protoc -I=$SRC_DIR --java_out=$DST_DIR $SRC_DIR/addressbook.proto (this is for the google protobufs)

which is straightforward.

In the Wire README they give this as an example:

% java -jar wire-compiler-VERSION-jar-with-dependencies.jar \
--proto_path=src/main/proto \
--java_out=out \
squareup/dinosaurs/dinosaur.proto \
squareup/geology/period.proto
Writing com.squareup.dinosaurs.Dinosaur to out
Writing com.squareup.geology.Period to out

I don't know how this works, because I don't have a jar file. Here's my path to the proto file:

enter image description here

So do I need to include a jar file in my project? If yes, which files have to be in it? Or what would the command line look like in my case?

0

There are 0 answers