File tree Expand file tree Collapse file tree
buildSrc/src/main/java/co/anitrend/retrofit/graphql/buildSrc/plugin/components
gradle-plugin/buildSrc/src/main/java/co/anitrend/retrofit/graphql/buildSrc/plugin/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,13 +23,25 @@ jobs:
2323 - name : Grant execute permission for gradlew
2424 run : chmod +x gradlew
2525 - name : Generate docs with dokka
26- run : ./gradlew :library:dokkaGeneratePublicationHtml
27- # TODO: Switch to multi-module Dokka. Currently only publishes :library facade docs
28- # (type aliases pointing to co.anitrend.retrofit.graphql.* packages).
29- # Future: use dokkaHtmlMultiModule or a composite task to document all library-type modules.
26+ run : |
27+ ./gradlew :annotations:dokkaGeneratePublicationHtml \
28+ :api:dokkaGeneratePublicationHtml \
29+ :android-assets:dokkaGeneratePublicationHtml \
30+ :runtime:dokkaGeneratePublicationHtml \
31+ :codegen-core:dokkaGeneratePublicationHtml \
32+ :serialization-gson:dokkaGeneratePublicationHtml \
33+ :serialization-kotlinx:dokkaGeneratePublicationHtml \
34+ :library:dokkaGeneratePublicationHtml
35+ # Merge all module docs into combined-docs
36+ mkdir -p combined-docs
37+ for module in annotations api android-assets runtime codegen-core serialization-gson serialization-kotlinx library; do
38+ if [ -d "$module/build/dokka/html" ]; then
39+ cp -r "$module/build/dokka/html/"* combined-docs/ 2>/dev/null || true
40+ fi
41+ done
3042
3143 - name : Deploy 🚀
3244 uses : JamesIves/github-pages-deploy-action@v4.8.0
3345 with :
3446 branch : docs # The branch the action should deploy to.
35- folder : library/build/dokka/html # The folder the action should deploy.
47+ folder : combined-docs
Original file line number Diff line number Diff line change 1+ import co.anitrend.retrofit.graphql.buildSrc.plugin.components.configureDokkaForJvm
12import co.anitrend.retrofit.graphql.buildSrc.plugin.components.configureSpotlessForJvm
23
34plugins {
45 kotlin(" jvm" )
56}
67
78configureSpotlessForJvm()
9+ configureDokkaForJvm()
810
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import co.anitrend.retrofit.graphql.buildSrc.plugin.extensions.libs
44import com.diffplug.gradle.spotless.SpotlessExtension
55import org.gradle.api.Project
66import org.gradle.kotlin.dsl.configure
7+ import org.jetbrains.dokka.gradle.DokkaExtension
78
89fun Project.configureSpotlessForJvm () {
910 plugins.apply (" com.diffplug.spotless" )
@@ -21,3 +22,17 @@ fun Project.configureSpotlessForJvm() {
2122 }
2223 }
2324}
25+
26+ fun Project.configureDokkaForJvm () {
27+ plugins.apply (" org.jetbrains.dokka" )
28+ extensions.configure<DokkaExtension > {
29+ moduleName.set(" retrofit-graphql-${this @configureDokkaForJvm.name} " )
30+ dokkaSourceSets.configureEach {
31+ skipDeprecated.set(false )
32+ reportUndocumented.set(true )
33+ skipEmptyPackages.set(true )
34+ jdkVersion.set(21 )
35+ sourceRoots.from(file(" src" ))
36+ }
37+ }
38+ }
Original file line number Diff line number Diff line change 1+ import co.anitrend.retrofit.graphql.buildSrc.plugin.components.configureDokkaForJvm
12import co.anitrend.retrofit.graphql.buildSrc.plugin.components.configureSpotlessForJvm
23
34plugins {
45 kotlin(" jvm" )
56}
67
78configureSpotlessForJvm()
9+ configureDokkaForJvm()
810
911dependencies {
1012 implementation(libs.graphql.java)
Original file line number Diff line number Diff line change @@ -27,3 +27,12 @@ fun Project.configureSpotlessForJvm() {
2727 }
2828 }
2929}
30+
31+ /* *
32+ * Stub for the composite build. Dokka is only needed in the root build
33+ * where API docs are generated; this avoids adding a Dokka dependency
34+ * to the composite build's buildSrc.
35+ */
36+ fun Project.configureDokkaForJvm () {
37+ // No-op: composite build does not generate Dokka for codegen-core
38+ }
Original file line number Diff line number Diff line change 33# before_install:
44# - ./custom_setup.sh
55install :
6- - echo "Running build commands"
7- - ./gradlew build --stacktrace
8- - ./gradlew publishMavenPublicationToMavenLocal
6+ - ./gradlew build --stacktrace --no-daemon -x lint -x lintVitalRelease
7+ - ./gradlew publishMavenPublicationToMavenLocal --no-daemon
98env :
109 CI : " true"
You can’t perform that action at this time.
0 commit comments