Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

#32: Enable publishing bdk-android sources and java docs #33

Conversation

kirillzh
Copy link
Contributor

Description

Currently sources and javadocs are not being published for bdk-android artifact (unlike bdk-jvm) which makes it impossible to look up sources and documentation of bdk-android in IDE when using it in any project. AGP 7.1.0 added new APIs to maven-publish plugin to allow publishing sources and javadocs for Android super easy, which are being used here.

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature
  • I've updated CHANGELOG.md

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

AGP 7.1.0 adds maven-publish APIs for making publishing javadocs and sources for Android libraries very easy. We can use that to resolve bitcoindevkit#32.

Changelog: https://developer.android.com/studio/releases/gradle-plugin#versioning-update.
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
Copy link
Contributor Author

@kirillzh kirillzh Mar 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in #32 this will probably need to be custom implemented to use dokka instead of actual javadocs.

@thunderbiscuit
Copy link
Member

thunderbiscuit commented Mar 23, 2022

This works as-is and builds the sources jar and the javadocs jar for me. As mentioned, a future PR should try and populate that javadocs jar with the Dokka output if possible, but that's not necessary at this point.

This does outline the fact that the releases should run the docs/patch workflow before publishing so as to have this jar file populated with our actual documentation, dokka or not.

ACK aea8d70.

@thunderbiscuit
Copy link
Member

@kirillzh if you mark this as ready for review I think we can merge.

@kirillzh kirillzh marked this pull request as ready for review March 23, 2022 19:55
@thunderbiscuit thunderbiscuit merged commit 61295bf into bitcoindevkit:master Mar 23, 2022
@kirillzh kirillzh deleted the issue-32/publish-android-sources-and-docs branch March 24, 2022 00:13
@notmandatory notmandatory added this to the Release 0.6.0 milestone Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants