Closed ahmedre closed 1 week ago
Tested by doing the following:
./gradlew publishToMavenLocal
mavenLocal
in android/settings.gradle
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)?
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.
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.
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.
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.
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.