bj0
09/09/2024, 2:57 PMpreviewImplementation
configuration, how would you make the previews use it? I guess I was hoping there was already a configuration like this built in that the preview used, but im guessing not.MR3Y
09/09/2024, 4:48 PMandroid {
....
buildTypes {
create("preview") {
initWith(getByName("debug"))
matchingFallbacks += listOf("debug")
}
....
}
}
dependencies {
add("previewImplementation", libs.ui.tooling) // instead of debugImplementation(libs.ui.tooling)
}
// in libs.versions.toml file
ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
and add the other dependency that you want to use in previews to previewImplementation
as wellMR3Y
09/09/2024, 4:49 PMMR3Y
09/09/2024, 4:50 PMbj0
09/10/2024, 7:41 PMMR3Y
09/10/2024, 8:21 PMMR3Y
09/10/2024, 8:27 PMbj0
09/19/2024, 5:03 PMpreviewImplementation
instead of debugImplementation
. For your second remark, I use commandline ./gradlew
to build/install, but manually changing a configuration setting wouldn't be much different than editing a file (not-automatic).bj0
09/19/2024, 5:04 PMMR3Y
09/19/2024, 5:10 PMbj0
09/19/2024, 7:08 PMcompileOnly
dependency, let me see if i can set it up againbj0
09/19/2024, 7:10 PMjava.lang.ClassNotFoundException: <my library class>
at java.lang.ClassLoader.loadClass(ClassLoader.java:592)
at java.lang.ClassLoader.loadClass(ClassLoader.java:525)
bj0
09/19/2024, 7:14 PMcompileOnly
to implementation
fixes the error, but this just brings us back to the beginning of trying to create a separate build config for the preview pluginMR3Y
09/19/2024, 8:01 PMpreviewImplementation
not implementation
as I said previously here at the end of f this message https://kotlinlang.slack.com/archives/C04TPPEQKEJ/p1725900495580069?thread_ts=1725472532.293059&cid=C04TPPEQKEJMR3Y
09/19/2024, 8:13 PMbj0
09/23/2024, 6:52 PMbj0
09/23/2024, 6:53 PM