grpc-kotlin
grpc-kotlin copied to clipboard
task generateProto failed
gradle:
plugins {
id "org.jetbrains.kotlin.jvm" version "1.3.72"
id "org.jetbrains.kotlin.plugin.spring" version "1.3.72"
...
id 'com.google.protobuf' version '0.8.13'
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.2.0"
}
generatedFilesBaseDir = "src/generated"
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
grpckt {
artifact = "io.grpc:protoc-gen-grpc-kotlin:0.2.1:jdk7@jar"
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
grpckt {}
}
}
}
error :
Execution failed for task ':generateProto'.
> protoc: stdout: . stderr: Activity.proto: warning: Import google/protobuf/wrappers.proto but not used.
src/generated/main/grpckt/com\some\activity\grpc\ActivityProtoGrpcKt.kt: No such file or directory
I think that the generatedFilesBaseDir = "src/generated"
is causing an issue. What happens if you remove it?
After removal, it is still the same error
This looks like a path issue (using forward and back slashes). What OS are you on?
windows 10 , jdk8
Do you get the same error with an unmodified sample app, like: https://github.com/GoogleCloudPlatform/kotlin-samples/tree/master/run/grpc-hello-world-gradle