-
Notifications
You must be signed in to change notification settings - Fork 452
Description
Is your feature request related to a problem? Please describe
Hi, this is related to the Dokka Gradle plugin, which I would like to help improve.
Improving usage of Gradle would help with the following issues:
- Support Gradle Configuration cache #2231
- Remove double negation in configuration option names #2515
- Gradle 7 incompatibility due to implicit dependency. #1833
- Merge multiproject (composite build) docs #1864
- dokka should provide gradle-idiomatic way to aggregate documentation #1752
- Error: Could not load the value of field
values
... found in fielddokkaSourceSets
of task:dokkaHtml
#2612 - Consider supporting Gradle's configuration cache #1217
- dokkaJavadocMultiModule? #1382
- Changes in custom CSS are ignored on incremental documentation rebuild #2286
- Make dokka Gradle task cacheable #830
- Remove the dependency on internal Gradle API #2822
- Bump Gradle to 7.6 #2756
- Use Gradle Worker API #2903
These PRs are related:
- Fix compatibility with Gradle's configuration cache #2499
- Fix configure version eagerly #2799
- Avoid snapshotting sourceLink.localDirectory input #2807
- Fix NoSuchMethodError with Gradle 8.0 RC1 #2816
Describe the solution you'd like
- use Kotlin DSL helpers to make the code more Kotlin-esque, for example
dokka/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/gradleConfigurations.kt
Line 10 in 8317436
attributes.attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage::class.java, "java-runtime")) - Tasks that require downloading files should cache and re-use files Slow documentation generation #2695
- Use configurations for sharing outputs between projects https://docs.gradle.org/7.3/samples/sample_jvm_multi_project_with_code_coverage.html
- Remove non-idiomatic helper functions https://github.com/Kotlin/dokka/blob/master/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt
- Rename files to match the contents, e.g. https://github.com/Kotlin/dokka/blob/master/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/main.kt
- Remove usages of internal Gradle API classes
dokka/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaLeafTask.kt
Line 16 in 8317436
DslObject(this).extensions.add("dokkaSourceSets", container) - avoid using
allprojects {}
orsubprojects {}
Lines 21 to 23 in 8317436
rootProject.subprojects { project -> project.tasks.create<DokkaTask>("dokkaTask") } dokka/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaParentTask.kt
Lines 54 to 60 in 8317436
fun addSubprojectChildTasks(childTasksName: String) { addChildTasks(project.subprojects, childTasksName) } fun removeSubprojectChildTasks(childTasksName: String) { removeChildTasks(project.subprojects, childTasksName) }
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered
Additional context
Perhaps the dokka team could create a 'gradle-plugin' tag for all relevant GitHub issues? https://github.com/Kotlin/dokka/issues?q=is%3Aissue+is%3Aopen++gradle
Are you willing to provide a PR?
Yes. I will try and split this up into smaller PRs.