atsushieno / alsa-javacpp

A refresh javacpp binding for alsa-lib (libasound)
MIT License
0 stars 0 forks source link

Maybe we should still provice alsa-javacpp-platform.jar #1

Open atsushieno opened 2 weeks ago

atsushieno commented 2 weeks ago

Currently alsa-javacpp is referenced in ktmidi in the way that JavaCPP does not really endorse - it directly adds implementation reference to alsa-javacpp package. On the other hand, we add rtmidi-javacpp and rtmidi-javacpp-platform, nicely in accordance with the official approach.

It did not matter because ALSA only runs on Linux and we could at least build alsa-javacpp for Linux x86_64 and Linux arm64 without hassle. The implemetation would resolve to both of them, but that did not matter.

Maybe.

I'm not sure if it brings in any conflicts at resolving libjnialsa.so from both references on arm64 (it never did for me on x64). And not sure what happens if we get RISC-V ABI.

So, probably we should add the "platform" jar just like other libraries.

It however brings in a drawback; right now we can reference only ktmidi-jvm-desktop jar and Gradle automatically resolves the "implementation" dependencies. If we switch to the "platform" manner, the reference will have to become "api" and we will need javacpp-platform Gradle plugin at each app. This change may bring in confusion among ktmidi app developers. If they update ktmidi version without checking anything, it will suddenly break their builds. That is something we should avoid.

atsushieno commented 2 weeks ago

We could at least publish alsa-javacpp-platform.jar. Whether we use it or not in ktmidi is up to ktmidi, not here.