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

Adds Gradle task dokkaHtml to run Dokka document generation #1466

Merged
merged 14 commits into from
Jul 25, 2022

Conversation

williamito
Copy link
Contributor

@williamito williamito commented Jun 21, 2022

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #1457

Description
Adds simple Gradle tasks to run Dokka document generation.

Alternative(s) considered
None; would love discussion on how to integrate doc generation better with current release processes however.

Type
Documentation

Screenshots (if applicable)
image

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #1466 (b2c9334) into master (d52a2ec) will decrease coverage by 0.65%.
The diff coverage is 69.90%.

@@             Coverage Diff              @@
##             master    #1466      +/-   ##
============================================
- Coverage     75.22%   74.56%   -0.66%     
- Complexity      650      660      +10     
============================================
  Files           128      128              
  Lines          3943     3995      +52     
  Branches        721      726       +5     
============================================
+ Hits           2966     2979      +13     
- Misses          591      620      +29     
- Partials        386      396      +10     
Impacted Files Coverage Δ
.../android/fhir/datacapture/QuestionnaireFragment.kt 6.00% <0.00%> (-0.13%) ⬇️
...fhir/datacapture/validation/ConstraintValidator.kt 100.00% <ø> (ø)
.../QuestionnaireItemAutoCompleteViewHolderFactory.kt 36.26% <20.00%> (-3.32%) ⬇️
...droid/fhir/datacapture/QuestionnaireItemAdapter.kt 59.21% <25.00%> (-2.96%) ⬇️
...ws/QuestionnaireItemDatePickerViewHolderFactory.kt 32.39% <28.57%> (+0.04%) ⬆️
...iews/QuestionnaireItemEditTextViewHolderFactory.kt 44.18% <30.00%> (+1.32%) ⬆️
...uestionnaireItemDateTimePickerViewHolderFactory.kt 66.90% <50.00%> (-0.71%) ⬇️
...tionnaireItemBooleanTypePickerViewHolderFactory.kt 58.49% <62.50%> (-1.16%) ⬇️
.../QuestionnaireItemDialogSelectViewHolderFactory.kt 74.72% <65.21%> (-3.85%) ⬇️
...iews/QuestionnaireItemDropDownViewHolderFactory.kt 64.70% <66.66%> (-1.01%) ⬇️
... and 32 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

@jingtang10
Copy link
Collaborator

what's the command to be run to generate the docs?

@Tarun-Bhardwaj Tarun-Bhardwaj added the P2 Medium priority issue label Jul 12, 2022
@williamito
Copy link
Contributor Author

williamito commented Jul 18, 2022

You can generate docs like this for datacapture, you can specify the other subprojects as well:

./gradlew datacapture:dokkaHtml

Make sure to gradle sync successfully first, it seems a bit fickle about downloading Dokka from the plugins line sometimes.

@williamito williamito enabled auto-merge (squash) July 18, 2022 11:47
@jingtang10 jingtang10 changed the title Dokka Adds Gradle task dokkaHtml to run Dokka document generation Jul 20, 2022
Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

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

datacapture/build.gradle.kts Outdated Show resolved Hide resolved
datacapture/build.gradle.kts Outdated Show resolved Hide resolved
datacapture/build.gradle.kts Outdated Show resolved Hide resolved
engine/build.gradle.kts Outdated Show resolved Hide resolved
workflow/build.gradle.kts Outdated Show resolved Hide resolved
@williamito williamito requested a review from joiskash as a code owner July 20, 2022 15:46
@williamito
Copy link
Contributor Author

can the config block be made into a Dokka.kt file in the buildSrc directory? Examples:

https://github.com/google/android-fhir/blob/master/buildSrc/src/main/kotlin/JacocoConfig.kt https://github.com/google/android-fhir/blob/master/buildSrc/src/main/kotlin/SpotlessConfig.kt https://github.com/google/android-fhir/blob/master/buildSrc/src/main/kotlin/LicenseeConfig.kt

I am not sure how to manage this, given how the Dokka plugin auto-creates tasks for every module it is added to. Would it be okay to merge having fixed your other comments?

@williamito williamito requested a review from jingtang10 July 20, 2022 16:50
williamito added a commit to williamito/android-fhir that referenced this pull request Jul 21, 2022
jingtang10 pushed a commit that referenced this pull request Jul 21, 2022
…w-0.1.0-alpha01 (#1467)

* Add generated docs for sdc-0.1.0-beta03, engine-0.1.0-beta01, workflow-0.1.0-alpha01

* Regenerate docs using #1466 naming
Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

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

thanks william - the introduction of the util function in buildSrc will be done in my pr #1503

@williamito williamito merged commit d715db4 into google:master Jul 25, 2022
@Tarun-Bhardwaj Tarun-Bhardwaj added Data capture type:documentation Improvements or additions to documentation labels Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Medium priority issue type:documentation Improvements or additions to documentation
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Integrate Dokka into all SDK components and build API reference docs
3 participants