mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix missing methods due to proguard
This commit is contained in:
parent
55d5959f54
commit
b5446fb77f
@ -1,12 +1,10 @@
|
||||
package org.futo.inputmethod.latin.xlm
|
||||
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||
import kotlinx.coroutines.flow.SharedFlow
|
||||
import kotlinx.coroutines.newSingleThreadContext
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.futo.inputmethod.annotations.ExternallyReferenced
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
val TrainingContext = newSingleThreadContext("AdapterTrainingContext")
|
||||
@ -31,10 +29,12 @@ class AdapterTrainer(
|
||||
private var handle: Long = 0L
|
||||
private fun isHandleValid() = handle != 0L
|
||||
|
||||
@ExternallyReferenced
|
||||
private fun emitProgress(progress: Float) {
|
||||
progressFlow?.tryEmit(progress)
|
||||
}
|
||||
|
||||
@ExternallyReferenced
|
||||
private fun emitLoss(loss: Float) {
|
||||
lossFlow?.tryEmit(loss)
|
||||
}
|
||||
|
24
proguard-rules.pro
vendored
24
proguard-rules.pro
vendored
@ -27,6 +27,30 @@
|
||||
-keepclasseswithmembers class * {
|
||||
native <methods>;
|
||||
}
|
||||
# Keep classes and methods that have the @UsedForTesting annotation
|
||||
-keep @org.futo.inputmethod.annotations.UsedForTesting class *
|
||||
-keepclassmembers class * {
|
||||
@org.futo.inputmethod.annotations.UsedForTesting *;
|
||||
}
|
||||
|
||||
# Keep classes and methods that have the @ExternallyReferenced annotation
|
||||
-keep @org.futo.inputmethod.annotations.ExternallyReferenced class *
|
||||
-keepclassmembers class * {
|
||||
@org.futo.inputmethod.annotations.ExternallyReferenced *;
|
||||
}
|
||||
|
||||
# Keep native methods
|
||||
-keepclassmembers class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
# Keep classes that are used as a parameter type of methods that are also marked as keep
|
||||
# to preserve changing those methods' signature.
|
||||
-keep class org.futo.inputmethod.latin.AssetFileAddress
|
||||
-keep class org.futo.inputmethod.latin.Dictionary
|
||||
-keep class org.futo.inputmethod.latin.NgramContext
|
||||
-keep class org.futo.inputmethod.latin.makedict.ProbabilityInfo
|
||||
-keep class org.futo.inputmethod.keyboard.KeyboardLayout { *; }
|
||||
|
||||
-dontobfuscate
|
||||
-optimizations !code/allocation/variable
|
Loading…
Reference in New Issue
Block a user