Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
dependencies ▾

Modern-Apps.git / auto / protocol / build.gradle.kts

build.gradle.kts37 lines · 1.4 KiBRaw
1plugins {
2 id("common-conventions-library")
3 alias(libs.plugins.protobuf)
4}
5// The Google Automotive Link (GAL) wire protocol: framing, TLS, channel multiplexing and the
6// generated protobuf. Deliberately free of Android framework calls so the whole handshake and
7// every codec round-trip is host-runnable, the same split :cast:protocol uses.
8//
9// An Android library rather than common-conventions-jvm because the credential loader reads the
10// PEMs from this module's assets.
11//
12// No `defaultConfig {` block: release.sh sed-injects versionCode/versionName after that
13// literal in every build.gradle.kts it finds, and a library has no such properties.
14dependencies {
15 implementation(project(":library"))
16 // `api`, not `implementation`: the generated message classes are part of this module's
17 // public surface, so a consumer that touches one needs GeneratedMessageLite and
18 // Internal.EnumLite on its compile classpath too.
19 api(libs.protobuf.javalite)
20}
21
22protobuf {
23 protoc {
24 artifact = libs.protobuf.protoc.get().toString()
25 }
26 generateProtoTasks {
27 all().forEach { task ->
28 task.builtins {
29 // `create`, not `named` as in :youpipe:extractor: the Android path does not
30 // pre-register the java builtin, so it has to be added here.
31 create("java") {
32 option("lite")
33 }
34 }
35 }
36 }
37}