InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
9.08k stars 719 forks source link

Question: Android Proguard Configuration - Remove Logging Statements #1779

Closed getmidas-baris-basturk closed 5 months ago

getmidas-baris-basturk commented 9 months ago

Hi, I could not find a reference for the ProGuard configuration for Android. I want to remove the logging related statements from the release APK. I tried the following and it seemed to work:

-assumenosideeffects class * implements org.koin.core.logger.Logger { public display(...); public debug(...); public info(...); public warn(...); public error(...); public log(...); }

Is this solution acceptable?

arnaudgiuliani commented 7 months ago

Just disabling the Koin logger can help. Is this your case here?

getmidas-baris-basturk commented 7 months ago

Hi @arnaudgiuliani, can you clarify what you mean by disabling the logger? If you mean to set the log level to none, that does not work. Without the proguard rules above, the logging statements remain in the final APK even though they are turned off.

getmidas-baris-basturk commented 5 months ago

I have created a sample project to demonstrate the issue however it seems to work fine. There must be some sort of a misconfiguration on our end thus I am closing the issue.