Hi, the new project layout is a huge simplificatio...
# amper
b
Hi, the new project layout is a huge simplification, especially for multi-module and multi-platform projects. For that reason, we would like to port our (big) project to benefit from the new layout but are currently stuck because we already depend on Kotlin 2.0 and Compose Multiplatform 1.6.10 (RC). In the meanwhile, and generally as a safer move, keeping the existing gradle setup and switching to the new project layout would be already a great step. Is something like this possible in the short mid term or waiting for Kotlin 2.0 support in Amper is the only possible solution to use the new layout? Thanks :)
a
Thanks for the feedback, Benoit! Amper with Kotlin 2.0 and the latest Compose Multiplatform 1.6.10 will be released this or the next week. As for the gradual migration in regard to the project layout, it’s possible to use Gradle-compatible layout. Check the documentation, the migration guide and an example project. Let me know if it answers your question
👍 1
b
Thanks for the answer, sounds really good that the next Amper release will support Kotlin 2.0 + latest Compose MPP! Any plan to make it work for any Kotlin version instead of having it hard-coded? Regarding the project layout, the idea was to do it the other way around: use the new layout on a not-yet-migrated-to-amper project because that is our favorite feature of Amper. But of course a full switch to Amper is even better provided that all our use cases are supported (which seems to be the case for our android + ios + wasmJs project).
a
I see. Changing the layout in Gradle project requires manually configuring sourceSets, including the KMP sourceSets hierarchy. It’s possible to replicate the Amper layout manually, after some trial and error. I’m afraid I can’t provide reliable instructions.
I would be really interested in hearing the reasons, why you find the Amper layout appealing. What do you expect it to bring to your project?
b
The traditional, Gradle-layout makes it IMO inefficient to navigate between files and is one of the (implicit) reasons why it’s hard for people to get onboarded and understand a project. I need a good and simple entry point into the source code and having a layout which helps me to get the right mental representation of the project. In a multiplatform + multimodule project, it is even more the case and even after daily usage, you still feel the inefficiency of having a nested structure. The Amper, flat layout, on the other hand, helps removing intermediary folders and clicks/typing and keep the files together which belong together (which will be even more the case when you can do it at the file-level, e.g. NetworkController@android.kt besides NetworkController@ios.kt). All in one, thanks to the Amper layout, I would feel more confident to show the source code to new developers or even less technical people.
a
Thanks, Benoit, that is a valuable input
🙏 1