-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
I'm trying to implement gRPC to my project and when I do everythig as you did in your Hello World example, I keep getting 'package com.google.protobuf. ...' does not exist and 'can not find symbol ...'
I added this line to my project gradle:
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.14"
And to my app gradle I added:
apply plugin: 'com.google.protobuf'
And in dependencies:
implementation 'io.grpc:grpc-okhttp:1.35.0' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-protobuf-lite:1.35.0' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-stub:1.35.0' // CURRENT_GRPC_VERSION
implementation 'org.apache.tomcat:annotations-api:6.0.53'
implementation 'com.google.protobuf:protobuf-javalite:3.12.1'
And this one as well:
protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.12.1' }
plugins {
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.35.0' // CURRENT_GRPC_VERSION
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
java { option 'lite' }
}
task.plugins {
grpc { // Options added to --grpc_out
option 'lite' }
}
}
}
}
Can someone tell me if I did something wrong or the issue is on your side?