Java 如何在不使用Maven的情况下使用Wire生成.proto文件?
对于一个项目,我一直在使用Google协议缓冲区,但现在我想切换到Wire。我想用这样的终端编译我的.proto文件Java 如何在不使用Maven的情况下使用Wire生成.proto文件?,java,android,android-studio,protocol-buffers,square-wire,Java,Android,Android Studio,Protocol Buffers,Square Wire,对于一个项目,我一直在使用Google协议缓冲区,但现在我想切换到Wire。我想用这样的终端编译我的.proto文件 protoc -I=$SRC_DIR --java_out=$DST_DIR $SRC_DIR/addressbook.proto (this is for the google protobufs) 这很简单 在Wire自述中,他们给出了以下示例: % java -jar wire-compiler-VERSION-jar-with-dependencies.jar \ --
protoc -I=$SRC_DIR --java_out=$DST_DIR $SRC_DIR/addressbook.proto (this is for the google protobufs)
这很简单
在Wire自述中,他们给出了以下示例:
% 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
我不知道这是怎么回事,因为我没有jar文件。
以下是我的原始文件路径:
那么我需要在我的项目中包含一个jar文件吗?如果是,其中必须包含哪些文件?
或者在我的例子中,命令行是什么样子的