在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):andrewkroh/gradle-protobuf-plugin开源软件地址(OpenSource Url):https://github.com/andrewkroh/gradle-protobuf-plugin开源编程语言(OpenSource Language):Groovy 98.0%开源软件介绍(OpenSource Introduction):Gradle Protobuf Plugin
What is it?This is a plugin for Gradle that enables compiling Google Protocol Buffer .proto files into data access classes. It generates Java, CPP, and Python source files from the .proto files in src/main/proto. This plugin adds a dependency on the Java plugin so that it can compile the generated Java source files. This plugin generates a sources jar that contains all of the Java sources (including those generated from the .proto files) in this project. The Protocol Buffer compiler must be on the path for the plugin to work. If the protocol buffer is in a different location then specify the full path to the compiler in your build.gradle file using protobuf.compiler = '/full/path/protoc'. Usageapply plugin: 'protobuf' The plugin JAR needs to be defined in the classpath of your build script. It is available from maven central. buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.andrewkroh.gradle:gradle-protobuf-plugin:0.5.0'
}
} The plugin automatically adds a dependency on the google protobuf jars so all you need to do is specify what repository(s) to use. repositories {
mavenCentral()
} Project LayoutSimply put your .proto files in TasksThe protobuf plugin defines the following task:
ExtensionsThe protobuf plugin adds a
ExampleSee the example directory in this repository. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论