Files
AIKeyboard/app/proguard-rules.pro
nova aa8fff2c0d Initial commit: HeliBoard + Gemma 4 on-device AI correction
Integrates LiteRT-LM (Google) with Gemma 4 E2B-it for on-device
spell/grammar correction in HeliBoard. After sentence-ending punctuation,
the model checks the sentence and shows a correction in the suggestion strip.
Tapping it replaces the original text — fully offline, no cloud API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 14:57:10 +02:00

62 lines
2.3 KiB
Prolog

# ============================================================
# MediaPipe tasks-genai / LlmInference
# ============================================================
-keep class com.google.mediapipe.** { *; }
-dontwarn com.google.mediapipe.**
# Protobuf (used internally by MediaPipe)
-keep class com.google.mediapipe.proto.** { *; }
-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
<fields>;
}
-keep class com.google.protobuf.** { *; }
-dontwarn com.google.protobuf.**
# Google Flogger (used by MediaPipe internals)
-keep class com.google.common.flogger.** { *; }
-dontwarn com.google.common.flogger.**
# JNI methods must not be renamed
-keepclasseswithmembernames class * {
native <methods>;
}
# MediaPipe framework interop
-keep public interface com.google.mediapipe.framework.* { public *; }
-keepclassmembers class com.google.mediapipe.framework.Packet {
public static *** create(...);
public long getNativeHandle();
public void release();
}
-keepclassmembers class com.google.mediapipe.framework.PacketCreator {
public void releaseWithSyncToken(...);
}
-keep class com.google.mediapipe.framework.MediaPipeException {
<init>(int, byte[]);
}
# ============================================================
# AI engine — never obfuscate so Java↔Kotlin interop is stable
# ============================================================
-keep class helium314.keyboard.latin.ai.** { *; }
-keepclassmembers class helium314.keyboard.latin.ai.** { *; }
# ============================================================
# Kotlin coroutines
# ============================================================
-keep class kotlinx.coroutines.** { *; }
-dontwarn kotlinx.coroutines.**
# Keep coroutine debug metadata (optional, remove in prod to shrink further)
-keepattributes SourceFile,LineNumberTable
# ============================================================
# HeliBoard — keep JNI-accessible classes and reflection targets
# ============================================================
-keep class helium314.keyboard.latin.BinaryDictionary { *; }
-keep class helium314.keyboard.latin.DicTraverseSession { *; }
-keep class helium314.keyboard.latin.NgramContext { *; }
-keep class helium314.keyboard.latin.utils.BinaryDictionaryUtils { *; }
-dontwarn helium314.keyboard.**