[#1435] Eliminate logging with Proguard
- Closes #1435 - Changelog update
This commit is contained in:
parent
2c09776f9f
commit
652487e563
|
@ -7,6 +7,7 @@ and this library adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- The SDK components no longer contain logging statements in the release build
|
||||||
- Gradle 8.7
|
- Gradle 8.7
|
||||||
- Android Gradle Plugin 8.3.0
|
- Android Gradle Plugin 8.3.0
|
||||||
- Kotlin 1.9.23
|
- Kotlin 1.9.23
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
# Strip out log messages
|
||||||
|
-assumenosideeffects public class cash.z.ecc.android.sdk.internal.Twig {
|
||||||
|
public static *** verbose(...);
|
||||||
|
public static *** debug(...);
|
||||||
|
public static *** info(...);
|
||||||
|
public static *** warn(...);
|
||||||
|
public static *** error(...);
|
||||||
|
public static *** assertLoggingStripped();
|
||||||
|
}
|
|
@ -571,6 +571,8 @@ interface Synchronizer {
|
||||||
|
|
||||||
validateAlias(alias)
|
validateAlias(alias)
|
||||||
|
|
||||||
|
validateLogging()
|
||||||
|
|
||||||
val saplingParamTool = SaplingParamTool.new(applicationContext)
|
val saplingParamTool = SaplingParamTool.new(applicationContext)
|
||||||
|
|
||||||
val loadedCheckpoint =
|
val loadedCheckpoint =
|
||||||
|
@ -739,3 +741,10 @@ private fun validateAlias(alias: String) {
|
||||||
"characters and only contain letters, digits, hyphens, and underscores."
|
"characters and only contain letters, digits, hyphens, and underscores."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun validateLogging() {
|
||||||
|
if (!BuildConfig.DEBUG) {
|
||||||
|
// In release builds, logs should be stripped by R8 rules
|
||||||
|
Twig.assertLoggingStripped()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue