Skip to content

Commit 0695a09

Browse files
committed
Add task for aggregated Javadocs again and deploy those
1 parent bed1550 commit 0695a09

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
restore-keys: ${{ runner.os }}-gradle
3030

3131
- name: Build JavaDocs
32-
run: ./gradlew javadoc
32+
run: ./gradlew aggregatedJavadocs
3333

3434
- name: Deploy JavaDocs
3535
uses: peaceiris/actions-gh-pages@v4

build.gradle.kts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ plugins {
1010
allprojects {
1111
apply(plugin = "java-library")
1212

13+
version = "v0.25.0"
14+
1315
tasks.withType<JavaCompile> {
1416
options.encoding = Charsets.UTF_8.toString()
1517
}
@@ -36,3 +38,27 @@ subprojects {
3638
}
3739
}
3840
}
41+
42+
tasks.register<Javadoc>("aggregatedJavadocs") {
43+
group = "documentation"
44+
description = "Generates aggregated Javadocs for all subprojects."
45+
(options as StandardJavadocDocletOptions).apply {
46+
encoding = Charsets.UTF_8.toString()
47+
links = listOf("https://docs.oracle.com/javase/11/docs/api/")
48+
title = "NewPipe Extractor ${rootProject.version}"
49+
tags = listOf(
50+
"apiNote:a:API Note:",
51+
"implSpec:a:Implementation Requirements:",
52+
"implNote:a:Implementation Note:"
53+
)
54+
}
55+
56+
dependsOn(subprojects.map { it.tasks.named("classes") })
57+
58+
subprojects.forEach { proj ->
59+
proj.extensions.findByType(JavaPluginExtension::class.java)?.sourceSets?.getByName("main")?.let { main ->
60+
source(main.allJava)
61+
classpath += main.output + proj.configurations.getByName("compileClasspath")
62+
}
63+
}
64+
}

extractor/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ publishing {
108108
create<MavenPublication>("release") {
109109
groupId = "net.newpipe"
110110
artifactId = "extractor"
111-
version = "v0.25.0"
111+
version = rootProject.version.toString()
112112

113113
afterEvaluate {
114114
from(components["java"])

0 commit comments

Comments
 (0)