build-logic: stop packaging .proto sources into every APK
- Commit
043a95b8dda8a354a2fc8c2e61a5f22fc5aff920- Author
- vayun-mathur <[email protected]>
- When
- 2026-09-12 01:31 UTC (2 months ago)
- Parents
baa8037
Diff
auto/build.gradle.kts
diff --git a/auto/build.gradle.kts b/auto/build.gradle.ktsindex 861d01a988..257556cf55 100644--- a/auto/build.gradle.kts+++ b/auto/build.gradle.kts@@ -9,17 +9,6 @@ android { defaultConfig { applicationId = "com.vayunmathur.auto" }- packaging {- resources {- // protoc copies every .proto it sees into the jar's resources, so without this- // the APK carries our two schemas plus protobuf's well-known types - about- // 125 KB of source that nothing reads. protobuf-lite never looks at a .proto at- // runtime; only full-protobuf descriptor reflection would, and we do not use it.- // Note :appstore has the same leak (22 files) and is left alone here: fixing it- // repo-wide belongs in common-conventions-app, not in this app's build file.- excludes += setOf("**/*.proto", "*.proto")- }- } } dependencies { // The GAL wire format. Nothing in the app re-implements it, and keeping it out of here is
build-logic/src/main/kotlin/common-conventions-app.gradle.kts
diff --git a/build-logic/src/main/kotlin/common-conventions-app.gradle.kts b/build-logic/src/main/kotlin/common-conventions-app.gradle.ktsindex 932019a554..7ce3c26452 100644--- a/build-logic/src/main/kotlin/common-conventions-app.gradle.kts+++ b/build-logic/src/main/kotlin/common-conventions-app.gradle.kts@@ -284,6 +284,13 @@ configure<com.android.build.api.dsl.ApplicationExtension> { "META-INF/LICENSE.md", "META-INF/NOTICE.md", )+ // protoc copies every .proto it compiles into the jar's resources, so any app+ // depending on a protobuf module ships its schemas plus protobuf's well-known+ // types - on the order of 100 KB of source that nothing reads. Every protobuf+ // module here (:appstore via grpc-protobuf-lite, :youpipe:extractor,+ // :auto:protocol) is lite, and lite never looks at a .proto at runtime; only+ // full-protobuf descriptor reflection would, and nothing in the repo uses it.+ excludes += setOf("**/*.proto", "*.proto") } // Left at the AGP default (false), which stores .so and .dex uncompressed so the // platform can mmap them straight out of the APK. MAOS ships these same APKs as