Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Gradle tasks to generate Javadoc #39

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Conversation

divergentdave
Copy link
Collaborator

@divergentdave divergentdave commented Nov 20, 2023

This adds a Gradle task to run javadoc. The trickiest part was figuring out how to get JARs of dependencies on the classpath without hacks with hardcoded paths or unneeded TaskProvider.get() calls.

Part of #9.

@divergentdave divergentdave requested a review from a team as a code owner November 20, 2023 18:20
@@ -72,3 +72,14 @@ tasks.withType<Test>().matching { it.name.matches(Regex("test.*UnitTest"))}.conf
val capitalizedHostRustTarget = hostRustTarget.replaceFirstChar { it.uppercase() }
dependsOn(tasks.named("cargoBuild${capitalizedHostRustTarget}"))
}

afterEvaluate {
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: why does this need to be in an afterEvaluate block?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is necessary for android.libraryVariants. If we were to run this earlier, that set would be empty, but waiting for after evaluation lets AGP set up the debug and release variants first.

@divergentdave divergentdave merged commit 2036175 into main Nov 22, 2023
3 checks passed
@divergentdave divergentdave deleted the david/javadoc-task branch November 22, 2023 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants