eygraber
01/10/2025, 4:17 AM@tools:sample works in xml)?gmz
01/10/2025, 8:30 AMcompileOnly and androidTestImplementation.
compileOnly will let the preview build, while androidTestImplementation will ensure the resources will be present in previews launched on the device.Colton Idle
01/10/2025, 9:21 PMgmz
01/10/2025, 9:47 PMdebugImplementation and something like androidx.compose.ui:ui-tooling, but with sample resources for previews.
I went with that weird and more complex `androidTestImplementation`/`compileOnly` combo simply because I disable the debug variant of all my modules, so that was the only way to exclude the resources from actual builds.gmz
01/10/2025, 9:57 PMdebugImplementation would not work, because then the resources would be missing when building the release flavor. So it's either what I'm suggesting or something even more complex done at the tooling levelgmz
01/10/2025, 10:01 PMdebugImplementation