2015-01-07 14:00:18 +01:00
|
|
|
# Add project specific ProGuard rules here.
|
|
|
|
# By default, the flags in this file are appended to flags specified
|
|
|
|
# in /home/andi/Android/Sdk/tools/proguard/proguard-android.txt
|
|
|
|
# You can edit the include path and order by changing the proguardFiles
|
|
|
|
# directive in build.gradle.
|
|
|
|
#
|
|
|
|
# For more details, see
|
|
|
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
|
|
|
|
|
|
# Add any project specific keep options here:
|
|
|
|
|
2020-10-11 16:10:35 +02:00
|
|
|
-dontobfuscate
|
|
|
|
|
2020-01-31 16:13:51 +01:00
|
|
|
# Pebble BG-JS
|
|
|
|
-keepclassmembers class * {
|
|
|
|
@android.webkit.JavascriptInterface <methods>;
|
|
|
|
}
|
|
|
|
-keepclassmembers class nodomain.freeyourgadget.gadgetbridge.service.devices.pebble.webview.JSInterface {
|
|
|
|
public *;
|
|
|
|
}
|
2022-03-29 23:11:35 +02:00
|
|
|
# Required for reflection in BangleJSDeviceSupport
|
2022-03-22 19:50:53 +01:00
|
|
|
-keepclassmembers class nodomain.freeyourgadget.gadgetbridge.model.CallSpec {
|
|
|
|
public static *;
|
|
|
|
}
|
2022-03-29 23:11:35 +02:00
|
|
|
# Required for reflection in method GattCharacteristic.initDebugMap()
|
|
|
|
-keepclassmembers class nodomain.freeyourgadget.gadgetbridge.service.btle.GattCharacteristic {
|
|
|
|
public static *;
|
|
|
|
}
|
2023-08-20 04:14:06 +02:00
|
|
|
# Keep constructors for support classes, as they're called by reflection in DeviceSupportFactory#createServiceDeviceSupport
|
|
|
|
-keep public class * extends nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport
|
|
|
|
-keepclassmembers class * extends nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport {
|
|
|
|
public <init>(nodomain.freeyourgadget.gadgetbridge.model.DeviceType);
|
|
|
|
public <init>();
|
|
|
|
}
|
2020-01-31 16:13:51 +01:00
|
|
|
-keepattributes JavascriptInterface
|
|
|
|
|
2024-06-29 22:56:04 +02:00
|
|
|
# Keep coordinators, they're only referenced from DeviceType
|
|
|
|
-keep public class * implements nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator
|
|
|
|
|
2024-04-15 23:14:05 +02:00
|
|
|
# Keep parseIncoming for GFDIMessage classes, as it is called by reflection in GFDIMessage#parseIncoming
|
|
|
|
-keep public class * extends nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.messages.GFDIMessage
|
|
|
|
-keepclassmembers class * extends nodomain.freeyourgadget.gadgetbridge.service.devices.garmin.messages.GFDIMessage {
|
|
|
|
public static *** parseIncoming(...);
|
|
|
|
}
|
|
|
|
|
2020-01-31 16:13:51 +01:00
|
|
|
# https://github.com/tony19/logback-android/issues/29
|
2023-09-11 11:17:04 +02:00
|
|
|
-dontwarn javax.mail.**
|
2020-01-31 16:13:51 +01:00
|
|
|
|
|
|
|
# To avoid any stacktrace ambiguity
|
|
|
|
-keepattributes SourceFile,LineNumberTable
|
|
|
|
|
|
|
|
# GreenDAO 2 - http://greenrobot.org/greendao/documentation/technical-faq/
|
|
|
|
-keepclassmembers class * extends de.greenrobot.dao.AbstractDao {
|
|
|
|
public static java.lang.String TABLENAME;
|
|
|
|
}
|
|
|
|
|
|
|
|
-keep class **$Properties
|
|
|
|
|
2020-06-15 16:32:09 +02:00
|
|
|
-keep class **$Properties { *; }
|
|
|
|
|
2020-09-28 16:19:24 +02:00
|
|
|
# Keep database migration classes accessed trough reflection
|
2020-08-01 03:03:15 +02:00
|
|
|
-keep class **.gadgetbridge.database.schema.* { *; }
|
|
|
|
|
2020-09-28 16:19:24 +02:00
|
|
|
# Keep Nordic DFU library
|
|
|
|
-keep class no.nordicsemi.android.dfu.** { *; }
|
|
|
|
|
2024-07-03 01:12:11 +02:00
|
|
|
# For android-emojify - we are not using moshi, so ignore these
|
|
|
|
-dontwarn com.squareup.moshi.**
|
|
|
|
-dontwarn kotlinx.serialization.**
|
|
|
|
-dontwarn okio.**
|
2020-07-28 04:43:08 +02:00
|
|
|
|
2020-08-01 03:03:15 +02:00
|
|
|
# Keep logback classes
|
|
|
|
-keep class ch.qos.** { *; }
|
2021-06-08 23:52:50 +02:00
|
|
|
-keep class org.slf4j.** { *; }
|
|
|
|
|
|
|
|
# Keep data classes
|
|
|
|
-keepclassmembers,allowobfuscation class * {
|
|
|
|
@com.google.gson.annotations.SerializedName <fields>;
|
2022-10-16 22:12:27 +02:00
|
|
|
}
|
2024-06-29 22:56:04 +02:00
|
|
|
# Somehow the rule above was not enough for some
|
|
|
|
-keep class nodomain.freeyourgadget.gadgetbridge.devices.pinetime.InfiniTimeDFU* { *; }
|
2022-10-16 22:12:27 +02:00
|
|
|
|
|
|
|
# Keep generated protobuf classes
|
2023-06-17 15:08:11 +02:00
|
|
|
-keep class nodomain.freeyourgadget.gadgetbridge.proto.** { *; }
|