Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
XyperCode committed Nov 7, 2023
1 parent 2809491 commit 2f8f8a0
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/javadoc-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deploy Javadoc

on:
release:
types:
- released
- edited

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/${{ github.event.release.tag_name }}
project: gradle
19 changes: 19 additions & 0 deletions .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ group 'io.github.ultreon.corelibs'
version '0.1.2'

mkdir("${rootProject.projectDir}/.mvnrepo")
apply plugin: 'java'
apply plugin: "java-library"

subprojects {
apply plugin: 'java'
Expand Down Expand Up @@ -74,3 +76,21 @@ subprojects {
tasks.withType(GenerateModuleMetadata) {
enabled = false
}

afterEvaluate {
javadoc {
source(subprojects.collect { subproject ->
subproject.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(subprojects.collect { subproject ->
subproject.sourceSets.main.compileClasspath
})
(options as StandardJavadocDocletOptions).links(
"https://javadoc.io/doc/org.jetbrains/annotations/$annotations_version",
)
}
}

0 comments on commit 2f8f8a0

Please sign in to comment.