Files
IronFox/patches/glean-noop.patch
celenity ceeae87d00 feat: Patch formatting
Applies consistent formatting and naming to patches

Signed-off-by: celenity <celenity@celenity.dev>
2026-07-06 00:50:48 +00:00

78 lines
3.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: celenity <celenity@celenity.dev>
Date: Sun, 05 Jul 2026 20:19:20 +0000
Subject: [PATCH] Glean - No-op
No-ops the Glean SDK.
Signed-off-by: celenity <celenity@celenity.dev>
---
diff --git a/glean-core/android/build.gradle b/glean-core/android/build.gradle
index b1d4b8cd..cf27a872 100644
--- a/glean-core/android/build.gradle
+++ b/glean-core/android/build.gradle
@@ -207,7 +207,7 @@ def generateUniffiBindings = tasks.register("generateUniffiBindings") {
exec {
workingDir project.rootDir
- commandLine 'cargo', 'uniffi-bindgen', 'generate', '--no-format', '--library', libraryPath, '--language', 'kotlin', '--out-dir', UNIFFI_OUT_DIR.get()
+ commandLine '{IRONFOX_UNIFFI}/uniffi-bindgen', 'generate', '--no-format', '--library', libraryPath, '--language', 'kotlin', '--out-dir', UNIFFI_OUT_DIR.get(), '--config', "${project.projectDir}/../uniffi.toml", '--crate', 'glean_core'
}
}
diff --git a/glean-core/android/proguard-rules-consumer.pro b/glean-core/android/proguard-rules-consumer.pro
index 0ca6fc73..821d45ce 100644
--- a/glean-core/android/proguard-rules-consumer.pro
+++ b/glean-core/android/proguard-rules-consumer.pro
@@ -2,15 +2,15 @@
# JNA specific rules
# See https://github.com/java-native-access/jna/blob/master/www/FrequentlyAskedQuestions.md#jna-on-android
--dontwarn java.awt.*
--keep class com.sun.jna.* { *; }
--keepclassmembers class * extends com.sun.jna.* { public *; }
+# -dontwarn java.awt.*
+# -keep class com.sun.jna.* { *; }
+# -keepclassmembers class * extends com.sun.jna.* { public *; }
# Glean specific rules
--keep class mozilla.telemetry.** { *; }
+# -keep class mozilla.telemetry.** { *; }
# The Glean SDK ships with classes used for tests as well. They are disabled
# and not directly usable in production code: they throw if used there. They
# can be used in tests just fine but, outside of tests, the test dependency
# they use won't be there, hence the warning. It's safe to suppress these.
--dontwarn mozilla.telemetry.glean.testing.**
+# -dontwarn mozilla.telemetry.glean.testing.**
diff --git a/glean-core/android-native/build.gradle b/glean-core/android-native/build.gradle
index 53716d52..c64f37bb 100644
--- a/glean-core/android-native/build.gradle
+++ b/glean-core/android-native/build.gradle
@@ -25,7 +25,9 @@ android {
minSdkVersion rootProject.ext.build['minSdkVersion']
targetSdkVersion rootProject.ext.build['targetSdkVersion']
}
-
+ buildFeatures {
+ buildConfig = false
+ }
buildTypes {
debug {
// Export our rules in debug, as a consumer might still enable proguard/r8
diff --git a/glean-core/android-native/proguard-rules-consumer.pro b/glean-core/android-native/proguard-rules-consumer.pro
index 53519d42..77b9ccb0 100644
--- a/glean-core/android-native/proguard-rules-consumer.pro
+++ b/glean-core/android-native/proguard-rules-consumer.pro
@@ -2,6 +2,6 @@
# JNA specific rules
# See https://github.com/java-native-access/jna/blob/master/www/FrequentlyAskedQuestions.md#jna-on-android
--dontwarn java.awt.*
--keep class com.sun.jna.* { *; }
--keepclassmembers class * extends com.sun.jna.* { public *; }
+# -dontwarn java.awt.*
+# -keep class com.sun.jna.* { *; }
+# -keepclassmembers class * extends com.sun.jna.* { public *; }
--