Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sadu to v2.3.1 #71

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
16 changes: 6 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ jobs:
run: ./gradlew build --stacktrace
- name: Generate javadocs
run: ./gradlew alljavadoc --stacktrace
- name: Deploy 🚀
if: ${{ !contains(github.head_ref, 'renovate/') }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/docs/javadoc
target-folder: javadoc
publish:
needs: build
runs-on: ubuntu-latest
Expand All @@ -45,13 +51,3 @@ jobs:
SONATYPE_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
documentation:
needs: build
runs-on: ubuntu-latest
if: ${{ !contains(github.head_ref, 'renovate/') }}
steps:
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/docs/javadoc
target-folder: javadoc
44 changes: 0 additions & 44 deletions .github/workflows/publish.yml

This file was deleted.

13 changes: 10 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,18 @@ tasks {
"implSpec:a:Implementation Requirements",
"implNote:a:Implementation Note"
)
val baseDir = file("${layout.buildDirectory.get()}/docs/javadoc/").toPath()
Documentation.buildJavadocIndexFile(baseDir.resolve("index.html"), rootProject.version.toString())
setDestinationDir(baseDir.resolve(rootProject.version.toString()).toFile())
val projects = rootProject.allprojects
setSource(projects.map { project -> project.sourceSets.main.get().allJava })
classpath = files(projects.map { project -> project.sourceSets.main.get().compileClasspath })
//setDestinationDir(file("${layout.buildDirectory.get()}/docs/javadoc"))
setDestinationDir(file("${rootProject.layout.buildDirectory.get()}/docs/javadoc/${rootProject.version}"))
println(destinationDir?.toString())
doLast {
try {
Documentation.buildJavadocIndexFile(file("${rootProject.layout.buildDirectory.get()}/docs/javadoc/index.html").toPath(), rootProject.version.toString())
} catch (e: Exception) {
logger.error("Failed to build Javadoc index file", e)
}
}
}
}
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/Documentation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ object Documentation {

fun buildJavadocIndexFile(path: Path, version: String) {
val document = if (!path.exists()) {
if (!path.parent.exists()) path.parent.createFile()
path.createFile()
generateNewIndexFile(path)
} else Jsoup.parse(path.toFile())
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jackson-datatype-jsr310 = "2.18.0"
jackson-yaml = "2.18.0"
postgresql = "42.7.4"
hikari = "6.0.0"
sadu = "2.3.0"
sadu = "2.3.1"
junit = "5.11.1"
paper-api = "1.20.6-R0.1-SNAPSHOT"
brigadier = "1.0.500"
Expand Down