From 2f00909fbc34e3bbeccff3bf227a51f4ecb620e5 Mon Sep 17 00:00:00 2001 From: agrancaric Date: Thu, 21 Apr 2022 13:29:53 +0200 Subject: [PATCH 1/3] Add gradle plugin for aggregating javadoc --- build.gradle | 1 + gradle.properties | 1 + 2 files changed, 2 insertions(+) diff --git a/build.gradle b/build.gradle index f0984b8d6..8ef4ee97a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,6 @@ plugins { id "fr.brouillard.oss.gradle.jgitver" version "$gradleJgitverPluginVersion" + id "io.freefair.aggregate-javadoc" version "$gradleAggregateJavadocPluginVersion" id "io.github.gradle-nexus.publish-plugin" version "$gradlePublishPluginVersion" id "jacoco-report-aggregation" } diff --git a/gradle.properties b/gradle.properties index 0c411aa0d..042f01eb3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,6 @@ # Library versions apachePoiVersion=5.2.2 +gradleAggregateJavadocPluginVersion=6.4.3 gradleJgitverPluginVersion=0.10.0-rc03 gradlePublishPluginVersion=1.1.0 modelMapperVersion=3.0.0 From 79dc42974827d1099f578dab3e3e2848e5fffd31 Mon Sep 17 00:00:00 2001 From: agrancaric Date: Thu, 21 Apr 2022 13:30:23 +0200 Subject: [PATCH 2/3] Add github action for generating and deploying generated javadoc to github pages --- .github/workflows/build.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 966ad31eb..3828419a0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,3 +71,19 @@ jobs: with: name: Aggregated JaCoCo Report files: build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml + + - name: Aggregate Javadoc + if: ${{ matrix.os == 'ubuntu-latest' && matrix.java == '8' && github.ref == 'refs/heads/master' && github.event_name == 'push' }} + uses: gradle/gradle-build-action@v2 + with: + arguments: aggregateJavadoc + + - name: Deploy Javadoc to GitHub Pages + if: ${{ matrix.os == 'ubuntu-latest' && matrix.java == '8' && github.ref == 'refs/heads/master' && github.event_name == 'push' }} + uses: JamesIves/github-pages-deploy-action@v4.3.0 + with: + branch: gh-pages + folder: build/docs/aggregateJavadoc + target-folder: docs + clean: true + single-commit: true From 20bba6d8fdd25326d967d2fad0c5078f4da35c69 Mon Sep 17 00:00:00 2001 From: agrancaric Date: Thu, 21 Apr 2022 13:31:08 +0200 Subject: [PATCH 3/3] Add github badge for displaying generated javadoc --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index bd4905ab8..9303c2aa5 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Codecov](https://codecov.io/gh/croz-ltd/nrich/branch/master/graph/badge.svg)](https://codecov.io/gh/croz-ltd/nrich) [![License](https://img.shields.io/github/license/croz-ltd/nrich?color=yellow&logo=apache)](https://github.com/croz-ltd/nrich/blob/master/LICENSE) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.croz.nrich/nrich-core-api/badge.svg?color=blue)](https://search.maven.org/search?q=net.croz.nrich) +[![JavaDoc](https://img.shields.io/badge/API%20doc-Javadoc-brightgreen)](https://croz-ltd.github.io/nrich/docs/index.html) # nrich