From 99440c6e65bc4a127c9c26112ae8b01eaf4be1f5 Mon Sep 17 00:00:00 2001 From: Ulrich GIBERNE Date: Wed, 23 Oct 2024 16:52:50 -0400 Subject: [PATCH] add HMS support --- android/build.gradle | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index 49c6831e..0f1cf277 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -27,6 +27,10 @@ rootProject.allprojects { } } +def isHmsEnabled() { + return (rootProject.hasProperty("airshipHmsEnabled") && rootProject.getProperty("airshipHmsEnabled") == "true") || (rootProject.ext.has("airshipHmsEnabled") && rootProject.ext.get("airshipHmsEnabled") == "true") +} + apply plugin: 'com.android.library' apply plugin: 'kotlin-android' @@ -60,5 +64,8 @@ dependencies { implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutine_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version" api "com.urbanairship.android:airship-framework-proxy:$airship_framework_proxy_version" + if (isHmsEnabled()) { + implementation "com.urbanairship.android:airship-framework-proxy-hms:$airship_framework_proxy_version" + } implementation "androidx.datastore:datastore-preferences:$datastore_preferences_version" }