Publish sources and javadoc for bdk-android #32
Comments
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.
This resolves bitcoindevkit#32. Using new API from AGP 7.1.0 to generate and publish Android sources and javadocs. https://developer.android.com/studio/releases/gradle-plugin#publish-javadoc-jar https://developer.android.com/studio/releases/gradle-plugin#publish-sources-jar
Since the Kotlin code for this project is auto generated by |
This resolves bitcoindevkit#32. Using new API from AGP 7.1.0 to generate and publish Android sources and javadocs. https://developer.android.com/studio/releases/gradle-plugin#publish-javadoc-jar https://developer.android.com/studio/releases/gradle-plugin#publish-sources-jar
This resolves bitcoindevkit#32. Using new API from AGP 7.1.0 to generate and publish Android sources and javadocs. https://developer.android.com/studio/releases/gradle-plugin#publish-javadoc-jar https://developer.android.com/studio/releases/gradle-plugin#publish-sources-jar
This resolves bitcoindevkit#32. Using new API from AGP 7.1.0 to generate and publish Android sources and javadocs. https://developer.android.com/studio/releases/gradle-plugin#publish-javadoc-jar https://developer.android.com/studio/releases/gradle-plugin#publish-sources-jar
This resolves bitcoindevkit#32. Using new API from AGP 7.1.0 to generate and publish Android sources and javadocs. https://developer.android.com/studio/releases/gradle-plugin#publish-javadoc-jar https://developer.android.com/studio/releases/gradle-plugin#publish-sources-jar
It looks like only |
I'm playing around with the answers proposed in in your link above but so far unable to replace the javadoc jar with the dokka docs. The build script is unable to find the task task (trying something like this:) tasks.named<Jar>("javadocJar") {
classifier = "javadoc"
from("$buildDir/dokka/html")
} |
Right, that's because maven publish plugin in AGP pre-7.1.0 does not know how to work with javadocs, #33 should fix that. I unfortunately don't have a ton of experience setting up dokka... Your custom task looks right but I wonder if it should depend on val javadocJar = tasks.named<Jar>("javadocJar") {
archiveClassifier.set("javadoc")
from(tasks.named("dokkaJavadoc"))
} |
Yeah no that was me testing your PR #33 actually! That's why I was a bit puzzled by it. You bumped AGP to When I print the list of tasks available under Also I get the same error when running your code block above (I tried it just in case it would fix it but no dice). |
…-and-docs #32: Enable publishing bdk-android sources and java docs
@thunderbiscuit, I think this is because publishing is only configured for release build variant: publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
} If we want to configure it for all variants we can do it like so: publishing {
multipleVariants {
withSourcesJar()
withJavadocJar()
allVariants()
}
} Which now generates tasks in all variants: $ ./gradlew tasks --all
...
android:javaDocDebugGeneration
android:javaDocDebugJar
android:javaDocReleaseGeneration
android:javaDocReleaseJar
... When I ran |
Also, I just tried generating local bdk-kotlin and applying docs with dokka on #18 branch + this changes from this PR and I see documentation as part of aar now which is amazing! 🎉 On high level, this is what it looks like when I jump to BDK definitions (e.g. |
@kirillzh Ha it's funny I was also playing with the As for the inline docs, that's awesome. I hadn't even taken a look myself yet. And honestly because I'm still vetting the workflow, I haven't invested time in actually writing and porting the full docs from the bdk library, but there is a lot more that we'll be able to bring once we're happy with the PR in #31. So that's awesome signal. |
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.
This resolves bitcoindevkit#32. Using new API from AGP 7.1.0 to generate and publish Android sources and javadocs. https://developer.android.com/studio/releases/gradle-plugin#publish-javadoc-jar https://developer.android.com/studio/releases/gradle-plugin#publish-sources-jar
Problem
It seems that sources and javadocs for bdk-android are not being generated and published to maven:
https://repo1.maven.org/maven2/org/bitcoindevkit/bdk-android/0.4.0.
Description
When using bdk-android as a library in your project it's not currently possible to look up source code and documentation of bdk-android because sources and javadocs are not being generated and published.
With AGP 7.1.0 publishing Android sources and javadocs is very simple, we can use that https://developer.android.com/studio/releases/gradle-plugin#build-variant-publishing.
Alternatives
No response
The text was updated successfully, but these errors were encountered: