Add Gradle tasks to generate protobuf, update readme
This commit is contained in:
@@ -62,10 +62,13 @@ projectTest {
|
|||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
}
|
}
|
||||||
|
|
||||||
val generateTests by task<JavaExec> {
|
fun generator(fqName: String) = task<JavaExec> {
|
||||||
classpath = the<JavaPluginConvention>().sourceSets["test"].runtimeClasspath
|
classpath = the<JavaPluginConvention>().sourceSets["test"].runtimeClasspath
|
||||||
|
main = fqName
|
||||||
main = "org.jetbrains.kotlin.generators.tests.GenerateTestsKt"
|
|
||||||
|
|
||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateTestsKt")
|
||||||
|
|
||||||
|
val generateProtoBuf by generator("org.jetbrains.kotlin.generators.protobuf.GenerateProtoBufKt")
|
||||||
|
val generateProtoBufCompare by generator("org.jetbrains.kotlin.generators.protobuf.GenerateProtoBufCompare")
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ import java.util.regex.Pattern
|
|||||||
//
|
//
|
||||||
// * Windows: download and unpack from here: https://code.google.com/p/protobuf/downloads/list
|
// * Windows: download and unpack from here: https://code.google.com/p/protobuf/downloads/list
|
||||||
// * Ubuntu: install "protobuf-compiler" package
|
// * Ubuntu: install "protobuf-compiler" package
|
||||||
// * Mac OS: install "protobuf" package from Homebrew or "protobuf-cpp" from MacPorts
|
// * macOS:
|
||||||
|
// brew install https://raw.githubusercontent.com/udalov/protobuf261/master/protobuf261.rb
|
||||||
// * You can also download source and build it yourself (https://code.google.com/p/protobuf/downloads/list)
|
// * You can also download source and build it yourself (https://code.google.com/p/protobuf/downloads/list)
|
||||||
//
|
//
|
||||||
// You may need to provide custom path to protoc executable, just modify this constant:
|
// You may need to provide custom path to protoc executable, just modify this constant:
|
||||||
|
|||||||
Reference in New Issue
Block a user