From edb3b2d2bc553a57faf614fea28838a1fdf5f76a Mon Sep 17 00:00:00 2001 From: Joonas Kerttula Date: Thu, 12 Feb 2026 10:39:01 -0800 Subject: [PATCH] feat: add consumer ProGuard rules for Android Auto integration --- android/build.gradle | 7 +------ android/consumer-rules.pro | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 android/consumer-rules.pro diff --git a/android/build.gradle b/android/build.gradle index 05fc04f..9aab0f9 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -26,6 +26,7 @@ android { defaultConfig { minSdk safeExtGet('minSdkVersion', 24) + consumerProguardFiles 'consumer-rules.pro' } compileOptions { @@ -37,12 +38,6 @@ android { buildConfig true } - buildTypes { - release { - minifyEnabled true - } - } - lintOptions { abortOnError false disable "GradleCompatible" diff --git a/android/consumer-rules.pro b/android/consumer-rules.pro new file mode 100644 index 0000000..7fe0648 --- /dev/null +++ b/android/consumer-rules.pro @@ -0,0 +1,18 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Keep NavInfoReceivingService and its static methods - accessed from Android Auto at runtime +-keep class com.google.android.react.navsdk.NavInfoReceivingService { + public static *; +}