Revision control

Copy as Markdown

// This script defines common setup logic for our components that use protocol buffers.
// Absent some special need for customization, we expect each project under `/components`
// that uses protocol buffers to apply this script to their build process via:
//
// ```
// apply from: "$rootDir/build-scripts/protobuf-common.gradle"
// ```
apply plugin: 'com.google.protobuf'
android {
sourceSets {
main {
proto {
srcDir '../src'
}
}
}
}
protobuf {
protoc {
artifact = libs.protoc.get().toString() // https://github.com/google/protobuf-gradle-plugin/issues/563
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
option "lite"
}
}
}
}
}
dependencies {
implementation libs.protobuf
}