From d52c26cd34bdeb569cf274dc193ad61fa4aa058d Mon Sep 17 00:00:00 2001 From: XyperCode Date: Tue, 7 Nov 2023 19:20:07 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Javadoc=20Deployments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/javadoc-releases.yml | 19 +++++++++++++++++++ .github/workflows/javadoc.yml | 19 +++++++++++++++++++ build.gradle | 14 ++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 .github/workflows/javadoc-releases.yml create mode 100644 .github/workflows/javadoc.yml diff --git a/.github/workflows/javadoc-releases.yml b/.github/workflows/javadoc-releases.yml new file mode 100644 index 0000000..97fa29e --- /dev/null +++ b/.github/workflows/javadoc-releases.yml @@ -0,0 +1,19 @@ +name: Deploy Javadoc + +on: + release: + types: + - published + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: 🚀 Deploy JavaDoc Release + uses: MathieuSoysal/Javadoc-publisher.yml@v2.4.0 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + javadoc-branch: javadoc + java-version: 17 + target-folder: docs/${{ github.event.release.tag_name }} + project: gradle diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml new file mode 100644 index 0000000..b488857 --- /dev/null +++ b/.github/workflows/javadoc.yml @@ -0,0 +1,19 @@ +name: Deploy Javadoc + +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: 🚀 Deploy JavaDoc + uses: MathieuSoysal/Javadoc-publisher.yml@v2.4.0 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + javadoc-branch: javadoc + java-version: 17 + target-folder: docs/latest + project: gradle diff --git a/build.gradle b/build.gradle index eab095e..c03b3e2 100644 --- a/build.gradle +++ b/build.gradle @@ -61,3 +61,17 @@ publish.dependsOn build tasks.withType(GenerateModuleMetadata) { enabled = false } + +afterEvaluate { + javadoc { + source(sourceSets.main.allJava.sourceDirectories) + title = "CoreLibs" + description = "CoreLibs is the core library collection for Ultreon Team projects." + setDestinationDir(file("$rootProject.projectDir/build/docs/javadoc")) + // Configure the classpath + classpath = files(sourceSets.main.compileClasspath) + (options as StandardJavadocDocletOptions).links( + // Kinda empty in here lmao. + ) + } +}