https://kotlinlang.org logo
Title
r

ribesg

08/20/2019, 9:37 AM
Use #splitties
1
g

gildor

08/20/2019, 10:25 AM
Migrate manually from one library without preview to another library without preview when one of your main reasons for migration is lack of preview 🤔
l

louiscad

08/20/2019, 11:47 AM
@gildor Splitties Views DSL has preview, I'm even using it these days.
r

ribesg

08/20/2019, 11:47 AM
What? Splitties has preview, so I don’t get your point.
g

gildor

08/20/2019, 11:48 AM
Which requires compilation
l

louiscad

08/20/2019, 11:48 AM
Compilation of my
ui
module (using the
compileKotlin
gradle task from IDE Gradle tool windows) is very fast after initial build thanks to incremental compilation and kapt-free plus java-free module. About 1-2, seconds, and preview refreshes automatically.
r

ribesg

08/20/2019, 12:35 PM
It’s basically as fast as XML preview for me. No difference.
g

gildor

08/20/2019, 12:40 PM
What is ui module? Do you have whole UI or the app there?
l

louiscad

08/20/2019, 12:44 PM
I have the whole UI there, including xml resources. I then use it in 2 modules: - One is the actual app, with all kapt stuff and slow build. - Another is the test module (not to be confused with test sources), which is a lightweight app where I manipulate the UI and do other kind of tests. It's more of a playground that is an actual full fledged Android app, so I can test special entry points like services, broadcast receivers, and storage related stuff if needed, foreground services, sound, does that work on all devices, etc…