Summary
Please provide a no-op variant of the library that can be used in release builds, similar to how Chucker, Pluto, and other debug libraries handle this.
Motivation
Currently to exclude DebugOverlay from release builds we have to use Gradle build variant conditionals:
dependencies {
debugImplementation(libs.debugoverlay)
}
This approach has drawbacks — any code referencing DebugOverlay must also be wrapped in if (BuildConfig.DEBUG) checks or moved to debug-only source sets, adding boilerplate throughout the codebase.
A no-op variant would allow us to always reference DebugOverlay API without any conditionals, while ensuring zero overhead in release builds.
Proposed solution
Publish a separate no-op artifact, similar to Chucker's approach:
dependencies {
debugImplementation("com.ms.square.debugoverlay:debugoverlay:x.x.x")
releaseImplementation("com.ms.square.debugoverlay:debugoverlay-no-op:x.x.x")
}
The no-op variant would contain the same public API surface (DebugOverlay.configure {}, DebugOverlay.addBugReportContributor() etc.) but with empty implementations, so the app compiles and runs without any debug functionality in release.
Current behavior
There is no no-op variant. Developers must use debugImplementation and guard all usages with debug checks.
Expected behavior
A no-op artifact that can be used in release builds, keeping the codebase clean without any conditional debug checks.
Thank you!
Summary
Please provide a no-op variant of the library that can be used in release builds, similar to how Chucker, Pluto, and other debug libraries handle this.
Motivation
Currently to exclude DebugOverlay from release builds we have to use Gradle build variant conditionals:
dependencies { debugImplementation(libs.debugoverlay) }This approach has drawbacks — any code referencing
DebugOverlaymust also be wrapped inif (BuildConfig.DEBUG)checks or moved to debug-only source sets, adding boilerplate throughout the codebase.A no-op variant would allow us to always reference
DebugOverlayAPI without any conditionals, while ensuring zero overhead in release builds.Proposed solution
Publish a separate no-op artifact, similar to Chucker's approach:
dependencies { debugImplementation("com.ms.square.debugoverlay:debugoverlay:x.x.x") releaseImplementation("com.ms.square.debugoverlay:debugoverlay-no-op:x.x.x") }The no-op variant would contain the same public API surface (
DebugOverlay.configure {},DebugOverlay.addBugReportContributor()etc.) but with empty implementations, so the app compiles and runs without any debug functionality in release.Current behavior
There is no no-op variant. Developers must use
debugImplementationand guard all usages with debug checks.Expected behavior
A no-op artifact that can be used in release builds, keeping the codebase clean without any conditional debug checks.
Thank you!