Closed swankjesse closed 2 months ago
Is the only motivation KotlinHostingXCTestCase
? Or are there others?
Today we lack a build system for the Swift-based projects, but we could add one which would let us share libraries that same way that we enjoy today with Gradle and Kotlin. I had talked to @efirestone about trying SPM not too long ago for the very purpose of sharing KotlinHostingXCTestCase
between our two layout modules.
Yep, that’s exactly it. Trying SPM feels like a better solution, but I’m not ready to shave that yak! I’ll do something quick & dirty for now to unblock and close this out.
Copy/paste! Two copies is fine for now.
SPM also would simplify CI and the nasty xcodebuild invocations.
Redwood includes two widget schemas:
It’s possible we’ll add more in the future: redwood-animations, redwood-lottie, etc.
For each we support a handful of target widget toolkits:
At the moment only redwood-layout has good snapshot tests for uiview. This is made possible by the
KotlinHostingXCTestCase
mechanism inredwood-layout-uiview
. I’d like to add snapshot tests for redwood-lazylayout without much copy-paste and without much build complexity.I propose flattening all tests for each toolkit. The resulting Gradle module structure would be something like this:
This structure makes it simple to reuse
KotlinHostingXCTestCase
for lazylayout tests. The drawback of this is you can’t run just the tests for lazylayout without running the tests for layout.