Rallista / maplibre-compose-playground

Composable MapLibre for Android Kotlin.
Mozilla Public License 2.0
6 stars 3 forks source link

Fix source and docs not being available #52

Closed ahmedre closed 1 week ago

ahmedre commented 1 week ago

This patch changes the publishing to only publish the release variant of the library. This fixes the availability of sources without needing to resort to enabling the experimental multi-variant docs and sources flag.

Fixes #45.

ahmedre commented 1 week ago

Tested by doing the following:

  1. bumping the version to a snapshot and ./gradlew publishToMavenLocal
  2. updating Ferrostar to the aforementioned snapshot, and enabling mavenLocal in android/settings.gradle
  3. built Ferrostar, and made sure I was able to jump directly to sources of this library from it
ianthetechie commented 1 week ago

What are the drawbacks to only publishing a release variant? I assume that's what other libs do as a workaround. Does this affect debuggability (ex: with a debugger attached)?

ahmedre commented 1 week ago

release and debug are really things controlled by the building Android application, so unless you have specific things in the library that you want to publish only for debug (i.e. debugImplementation dependencies, etc) separate from release, they're typically exactly the same (since r8, etc, typically run on the Android application at the very end, so not on a per-jar/aar basis). it does not affect debuggability also.

other open source libraries also do this - for example okhttp and coil.

ianthetechie commented 1 week ago

Gotcha. Thanks for the context! That's super helpful. Thanks for bearing with us as both of us have a lot more expertise building in more C-style languages where there is a massive difference 😅 It makes sense that the JVM would be different.

ahmedre commented 1 week ago

Thank you! To be safe, next time you publish a new version, Maven Central puts it in a staging location so we can test it and make sure everything works as expected before pushing it as an official artifact.

ianthetechie commented 1 week ago

It's version 0.2.0 ;) It's Ok if we make a mistake occasionally ;) This is extremely low risk too...

Anyways, I can happily confirm that this DOES finally fix things. Though I also had to run gradle clean and click download sources yet again for it to finally take effect.

image