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. + ) + } +}