Skip to content
Snippets Groups Projects
Commit da89672a authored by Tumbul, Erwin's avatar Tumbul, Erwin
Browse files

Include grpc netcode generation into gradle build chain.

parent 4dccb07b
Branches
No related tags found
No related merge requests found
plugins {
id 'com.android.application'
id 'com.google.protobuf' version '0.8.17'
}
android {
......@@ -25,8 +26,38 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
proto {
srcDirs "../../../../shared"
}
}
}
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:3.19.2"
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.45.1'
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
java { option 'lite' }
}
task.plugins {
grpc { option 'lite' }
}
}
}
}
dependencies {
implementation "androidx.core:core:1.7.0"
......@@ -36,4 +67,9 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'io.grpc:grpc-okhttp:1.45.1'
implementation 'io.grpc:grpc-protobuf-lite:1.45.1'
implementation 'io.grpc:grpc-stub:1.45.1'
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
}
\ No newline at end of file
syntax = "proto3";
option java_multiple_files = true;
option java_package = "io.grpc.notifier";
option java_outer_classname = "NotifierComProto";
option objc_class_prefix = "NC";
package netcode;
service NotifierCom {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment