Hello from Pison <Pison> - Here to inquire about s...
# welcome
h
Hello from Pison Pison - Here to inquire about support for Pants in a Kotlin Multi-Platform build perspective with Android and iOS applications being built. Our repos includes Kotlin, Java, Python, C and C++ code. Our core SDK is built on Kotlin Multi-Platform and we’re evaluating build tools to make things easier to build across the projects in our monorepos.
👀 1
👋 4
f
Pants only supports Kotlin on the JVM currently.
h
Yeah that’s what I read. What are the limitations for making KMP not a possibility?
f
For one, we don't have a complete C/C++ backend (which is still a work in progress).
if that is needed for native builds
(which I recall would be handled by Kotlin/Native?)
the main issue though is that no one on the current set of maintainers has familiarity with Kotlin/Native and Kotlin/JS
at least that is what I recall
h
I see. So if I were to test drive Pants - it would be able to build our Kotlin for JVM. Would it be able to create artifacts compatible with Android (non native)
Yeah the kotlin multiplatform builds are handled by gradle plugins
f
and for Pants, Pants would need to replicate the build logic performed by those gradle plugins
h
Yeah - not a small task of course
f
exactly
h
Could Pants somehow be used as an extension to run the gradle plugins from gradle (silly idea but more of a curiosity)
f
yes there is some work being done via the
experimental_shell_command
target type for use cases like that. (One of the motivating uses cases is getting some ability to support Javascript workflows in advance of there being "proper" JS support in Pants.)
h
To clarify, there are no "limitations" per se, just a bunch of functionality that hasn't been implemented yet 🙂
w
I have an upcoming KMM project in a few months - Pants didn't seem like a "great" fit, because it would essentially be a gradle runner. However, where i am using Pants a lot is that I have it call my dev/CI stuff to keep dev consistency in running these functions without needing bash scripts everywhere.
e.g. calling swift-format or whatever for iOS, ktlint for kotlin, etc So, it doesn't touch the packaging workflow - but covers the rest of the workflow. However, if I added Python or C++ to that repo, then the equation changes significantly.
@hallowed-machine-81147 Is your workflow C/C++, imported by kotlin, used by KMM (via Kotlin Native)? Or do you pull in the C/C++ libs into Swift/ObjC as well?
h
Currently - we build C/C++ libs and compile them for different archs. Currently it’s all focused on JNI that runs on macOS, windows, and android arm64
They are all access via the JNI for native functionality with isn’t completely KMP designed but we’re looking at changing that
w
Ahh, cool!