hhariri
Stylianos Gakis
11/09/2023, 12:32 PMLeonardo Silveira
11/09/2023, 12:35 PMAmejonah 1200
11/09/2023, 1:49 PMakapanina
11/09/2023, 2:05 PMakapanina
11/09/2023, 2:05 PMSoundlicious
11/09/2023, 3:21 PMLandry Norris
11/09/2023, 3:21 PMeygraber
11/09/2023, 5:01 PMczuckie
11/09/2023, 9:44 PMmbonnin
11/10/2023, 10:27 AMGil Sinclair-Julio
11/10/2023, 8:49 PMNOTE: Since Amper is currently Gradle-basedAre there long term plans to possibly move away from gradle? 😏 or at least decoupling it so another build system can be used? - Anyways, super glad this is happening - imo gradle build scripts (kotlin or groovy) has always left a lot to be desired from a developer experience standpoint
Waldemar Kornewald
11/13/2023, 11:49 AM@platform
suffix. 🥳 Also, I’ve seen that you can build native JVM-less cli tools and tried it out a little bit. It’s awesome that a simple file containing only product: macos/app
was sufficient. No need to apply plugins and reading long docs about how to configure a native cli build. It just worked and that’s how it should be. 🚀 Also looking at the possible publication setup and other configs, the YAML based DSL removes so much friction compared to Gradle.
I’ll post a few more thoughts in separate messages, so they can be separate threads:Waldemar Kornewald
11/13/2023, 11:49 AMWaldemar Kornewald
11/13/2023, 11:49 AMmacos/app
and linux/app
could be built from the same module, but currently I have to create separate modules instead. Maybe the solution is to merge the macos/app
and linux/app
products into a native/app
type. Similarly, the planned windows/dll
and linux/so
etc. somehow overlap with lib
and publication definitions (e.g. Cocoapods). Something about this solution isn’t quite right yet.Waldemar Kornewald
11/13/2023, 11:49 AMproduct:
type: lib
platforms: [android, iosArm64, iosSimulatorArm64, iosX64, jvm, linuxArm64, linuxX64, macosArm64, macosX64]
=> Cannot create a framework: sharedDebugFramework. Binaries of this kind are not available for target linuxArm64
Waldemar Kornewald
11/13/2023, 11:49 AMlib
projects it might be possible to build for absolutely all targets that Kotlin supports. Can’t we have an all
platform, maybe with an exclude
option? And similarly, ios
and macos
etc. platform shortcuts. Breaking changes about the meaning of those shortcuts would be expected and absolutely OK. So if iosSimulatorArm64
gets added to ios
later, that really is the desired behavior. I’d rather always attempt to build for the full set of platforms than forget some platform. Especially if my lib only relies on the stdlib (e.g. because it’s a Base64 implementation or a MIME types DB or an XML parser or …). Having to explicitly list all targets is bad for the open-source library ecosystem and it’s really only necessary when your lib contains platform-specific code. Such libs can still maintain an explicit list of supported platforms, but ideally exclusion-based, so when new platforms get supported the developers notice that by default without having to read the Kotlin “What’s new” section.Waldemar Kornewald
11/13/2023, 11:49 AMauto
(or only-necessary
?) platform for lib
modules which aren’t published, but only used within the same repo as internal dependencies could be useful. That auto
platform would auto-adjust based on what the final binaries need. If there are macos/app
and android
and ios
modules which depend on the same shared lib
then this lib would automatically be built for those platforms. No need to even list any platforms, at all. This auto
value could even be the default, but as soon as you add a publish
definition for Maven you’d have to explicitly choose between all
or an explicit list of platforms (hopefully with ios
etc. shortcuts).Waldemar Kornewald
11/13/2023, 12:17 PMSlackbot
11/13/2023, 1:09 PMaleksandr.syplivchak
11/13/2023, 2:09 PMsdeleuze
11/13/2023, 2:17 PMJacob Ras
11/13/2023, 8:11 PMsettings.gradle.kts
and the /gradle
folder. However, without gradlew (.bat)
, not much is going to happen.
• It doesn't once mention how to run it (gradlew run
). That's described on Usage.md
but a tutorial should be a bit more complete
• In step 7, the "new file layout" shows android-app/src/main.kt
but that should be android-app/src/MainActivity.kt
. It's correct in the linked full example code.
It's nice how every step in the tutorial links to a working full example 👌🏼.Jacob Ras
11/13/2023, 8:53 PMshared
module + app-android
and app-desktop
. Both work, but Fleet isn't happy with the Android code. Not sure if this should be in the #fleet channel instead. Using Fleet 1.26 (Nov. 7) on Windows 11. Errors remain after syncing & reloading workspace. No issues with the desktop code.aleksandr.syplivchak
11/13/2023, 8:55 PMWaldemar Kornewald
11/14/2023, 8:58 AMlibs/*
APIs)
◦ …
Either you develop the app for the client or they build it and integrate either your logic SDKs or ViewModels or your themable UI (or some combination). EDIT: For SDKs it’s important to have a simple way to expose the whole API, similar to the way it works on JVM with just public vs. private. The current JS/WASM export annotations are too painful and the XCFramework export
build configs are also quite repetitive and error-prone when working with multiple SDKs and many modules.
Let’s say there are 100+ modules overall. You need linting, Sonarqube, dependency update and security checks, snapshot and unit tests and code coverage, version consistency (e.g. BOM), API docs with real text and examples (not just Dokka-generated references, but more like Kotlin's docs), assets and translations (at libs/*-sdk
, libs/ui
and apps/*
level, also overriding/customizing values from lower-level modules).
Some consumers of your SDKs are allowed to see the source code, others only get the binaries - ideally with integrated API docs.
Thus you’d want to keep the configuration as centralized as possible. Settings should ideally be transitive (e.g. iOS pods, webpack customizations, kotlinx.serialization, etc.). They should also be applied from the root and match on certain path patterns or module properties. With too much repetition you’ll lose yourself in complexity and will have a hard time updating configs and finding out how the build system is configured and which outputs there are at all (your different XCFrameworks, apps, etc.). Ideally you don’t have to look at 30 module.yaml files to understand which artifacts get built in the project.
Side-problem: Your iOS apps with native UI need to integrate one or multiple XCFrameworks. Your iOS apps are modularized, too. So if foo-sdk and bar-sdk depend on common/oauth, the the iOS app’s modules need to reuse that common/oauth API and be able to pass objects to both foo-sdk and bar-sdk. That’s a huge problem because with the current build system SDKs become separate XCFrameworks/WASM/JS libs with their own incompatible copy (!) of common/oauth. So the resulting XCFrameworks/WASM/etc. need to be built and published in a modularized way somehow and this should ideally even work across multiple repos.
I hope this is a useful example for discussing Amper’s solution. Is this even a use-case Amper wants to serve? Maybe a tiny similar project in the samples would be helpful, too (I think a lot of problems in the current Gradle based build system would’ve been avoided with such a more complex example).Michael Taylor
11/15/2023, 4:34 AMandrew
11/16/2023, 10:10 PMLandry Norris
11/16/2023, 10:32 PMroutis
11/18/2023, 6:30 PM