Skip to content

Commit f454a31

Browse files
authored
Merge pull request #8 from SLNE-Development/feat/dokka
Draft: Feat/dokka
2 parents 04c0801 + 290572b commit f454a31

File tree

5 files changed

+81
-2
lines changed

5 files changed

+81
-2
lines changed

.github/workflows/publish-docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Dokka Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- version/1.21
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up JDK
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'graalvm'
20+
java-version: '21'
21+
22+
- name: Install dependencies
23+
run: ./gradlew dependencies
24+
25+
- name: Generate and move Dokka Docs
26+
run: ./gradlew publishDokkaToDocs
27+
28+
- name: Commit and Push changes
29+
run: |
30+
git config --global user.name "GitHub Actions"
31+
git config --global user.email "[email protected]"
32+
git add docs
33+
git commit -m "Update Dokka Docs"
34+
git push

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
import org.jetbrains.dokka.DokkaConfiguration
2+
import org.jetbrains.dokka.gradle.DokkaTask
3+
14
plugins {
25
id("io.papermc.paperweight.userdev") version "2.0.0-beta.14" apply false
3-
}
6+
alias(libs.plugins.dokka)
7+
}
8+
9+
allprojects {
10+
repositories {
11+
mavenCentral()
12+
}
13+
14+
if (subprojects.isEmpty()) {
15+
apply(plugin = rootProject.libs.plugins.dokka.get().pluginId)
16+
}
17+
}
18+
19+
tasks {
20+
dokkaHtml {
21+
outputDirectory.set(layout.buildDirectory.dir("documentation/html"))
22+
}
23+
24+
withType<DokkaTask>().configureEach {
25+
dokkaSourceSets.configureEach {
26+
documentedVisibilities = setOf(
27+
DokkaConfiguration.Visibility.PUBLIC,
28+
DokkaConfiguration.Visibility.PROTECTED
29+
)
30+
}
31+
}
32+
33+
register<Copy>("publishDokkaToDocs") {
34+
dependsOn(dokkaHtmlMultimodule)
35+
from(buildDir.resolve("dokka/htmlMultiModule"))
36+
into(rootDir.resolve("docs"))
37+
}
38+
}
39+

gradle/libs.versions.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ maven-repo-auth = "3.0.4"
5858
shadow-gradle-plugin = "9.0.0-beta7"
5959
ksp-gradle-plugin = "2.1.10-1.0.29"
6060
run-paper-gradle-plugin = "2.3.1"
61+
dokka = "2.0.0"
6162

6263

6364
[libraries]
@@ -148,8 +149,10 @@ shadow-gradle-plugin = { module = "com.gradleup.shadow:shadow-gradle-plugin", ve
148149
ksp-gradle-plugin = { module = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin", version.ref = "ksp-gradle-plugin" }
149150
plugin-yml-paper-gradle-plugin = { module = "net.minecrell.plugin-yml.bukkit:net.minecrell.plugin-yml.bukkit.gradle.plugin", version.ref = "plugin-yml-paper" }
150151
run-paper-gradle-plugin = { module = "xyz.jpenilla.run-paper:xyz.jpenilla.run-paper.gradle.plugin", version.ref = "run-paper-gradle-plugin" }
152+
dokka-gradle-plugin = { module = "org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin", version.ref = "dokka" }
151153

152154
[plugins]
153155
plugin-yml-paper = { id = "net.minecrell.plugin-yml.paper", version.ref = "plugin-yml-paper" }
154156
run-paper = { id = "xyz.jpenilla.run-paper", version.ref = "run-paper-gradle-plugin" }
155157
maven-repo-auth = { id = "org.hibernate.build.maven-repo-auth", version.ref = "maven-repo-auth" }
158+
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }

0 commit comments

Comments
 (0)