https://kotlinlang.org logo
#amper
Title
# amper
w

Waldemar Kornewald

11/13/2023, 11:49 AM
Similarly, an
auto
(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).
thank you color 1
a

Anton Prokhorov

11/14/2023, 1:54 PM
thanks for the ideas, we are considering `auto`/`all` options
w

Waldemar Kornewald

11/14/2023, 2:08 PM
Maybe another, more controversial thing to consider: Make
lib
the default module type (and for SDKs
all
could be defined in the root build script). As projects grow they tend to have more lib modules than app modules, so why not favor libs and make that use-case as easy/cheap as possible? Many projects then wouldn’t need to set any defaults for lib modules at all. Also, maybe for published modules the lib platform should switch to
all
by default? If someday all open-source APIs support all platforms this might be a good default to have. Maybe. Not quite sure about both of them. Could be not worth the effort if setting the default lib config in the root build script takes just 1-2 lines or so.