Include images in dackka output
PiperOrigin-RevId: 416848472
This commit is contained in:
parent
f352836bde
commit
7aac5e2500
@ -67,12 +67,12 @@ class CombinedJavadocPlugin implements Plugin<Project> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def dackkaOutputDir = project.file("$project.buildDir/docs/dackka")
|
||||||
project.task(DACKKA_TASK_NAME, type: JavaExec) {
|
project.task(DACKKA_TASK_NAME, type: JavaExec) {
|
||||||
doFirst {
|
doFirst {
|
||||||
// Recreate the output directory to remove any leftover files from a previous run.
|
// Recreate the output directory to remove any leftover files from a previous run.
|
||||||
def outputDir = project.file("$project.buildDir/docs/dackka")
|
project.delete dackkaOutputDir
|
||||||
project.delete outputDir
|
project.mkdir dackkaOutputDir
|
||||||
project.mkdir outputDir
|
|
||||||
|
|
||||||
// Download the Dackka JAR.
|
// Download the Dackka JAR.
|
||||||
new URL(DACKKA_JAR_URL).withInputStream {
|
new URL(DACKKA_JAR_URL).withInputStream {
|
||||||
@ -104,7 +104,7 @@ class CombinedJavadocPlugin implements Plugin<Project> {
|
|||||||
.filter({ f -> project.file(f).exists() }).join(";")
|
.filter({ f -> project.file(f).exists() }).join(";")
|
||||||
def dependenciesString = project.files(dependencies).asPath.replace(':', ';')
|
def dependenciesString = project.files(dependencies).asPath.replace(':', ';')
|
||||||
args("-moduleName", "",
|
args("-moduleName", "",
|
||||||
"-outputDir", "$outputDir",
|
"-outputDir", "$dackkaOutputDir",
|
||||||
"-globalLinks", "$globalLinksString",
|
"-globalLinks", "$globalLinksString",
|
||||||
"-loggingLevel", "WARN",
|
"-loggingLevel", "WARN",
|
||||||
"-sourceSet", "-src $sourcesString -classpath $dependenciesString",
|
"-sourceSet", "-src $sourcesString -classpath $dependenciesString",
|
||||||
@ -113,6 +113,18 @@ class CombinedJavadocPlugin implements Plugin<Project> {
|
|||||||
}
|
}
|
||||||
description = "Generates combined javadoc for developer.android.com."
|
description = "Generates combined javadoc for developer.android.com."
|
||||||
classpath = project.files(new File(getTemporaryDir(), "dackka.jar"))
|
classpath = project.files(new File(getTemporaryDir(), "dackka.jar"))
|
||||||
|
doLast {
|
||||||
|
libraryModules.each { libraryModule ->
|
||||||
|
project.copy {
|
||||||
|
from "${libraryModule.projectDir}/src/main/javadoc"
|
||||||
|
into "${dackkaOutputDir}/reference/"
|
||||||
|
}
|
||||||
|
project.copy {
|
||||||
|
from "${libraryModule.projectDir}/src/main/javadoc"
|
||||||
|
into "${dackkaOutputDir}/reference/kotlin/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user