grpc-java/examples/example-servlet/build.gradle

37 lines
919 B
Groovy

plugins {
id 'com.google.protobuf' version '0.9.5'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
id 'war'
}
repositories {
mavenCentral()
mavenLocal()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
def grpcVersion = '1.75.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.5'
dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}",
"io.grpc:grpc-servlet:${grpcVersion}",
"io.grpc:grpc-stub:${grpcVersion}"
compileOnly "javax.servlet:javax.servlet-api:4.0.1",
"org.apache.tomcat:annotations-api:6.0.53"
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
plugins { grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" } }
generateProtoTasks {
all()*.plugins { grpc {} }
}
}