Remove jetpack compose testtag for release builds

Viewed 175

I am searching a way to remove jetpack compose testtags in release builds.

1 Answers

Not sure if there's something out-of-the-box on rc02. But you can do the following:

fun Modifier.testTagDebug(tag: String): Modifier =
    if (BuildConfig.DEBUG) this.testTag(tag) else this
Related