Improve Javadoc postprocessing 2

- Fix typo
- Reinstate copy step. It's needed for images

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190976774
This commit is contained in:
olly 2018-03-29 13:26:15 -07:00 committed by Oliver Woodman
parent 64b2b34798
commit aefd948e96
3 changed files with 11 additions and 1 deletions

View File

@ -49,6 +49,12 @@ class CombinedJavadocPlugin implements Plugin<Project> {
}
}
doLast {
libraryModules.each { libraryModule ->
project.copy {
from "${libraryModule.projectDir}/src/main/javadoc"
into "${project.buildDir}/docs/javadoc"
}
}
project.fixJavadoc()
}
}

View File

@ -37,6 +37,10 @@ android.libraryVariants.all { variant ->
project.android.getBootClasspath())
}
doLast {
copy {
from "src/main/javadoc"
into "$buildDir/docs/javadoc"
}
project.fixJavadoc()
}
}

View File

@ -24,7 +24,7 @@ ext.fixJavadoc = {
def oracleRoot = "https://docs.oracle.com/javase/7/docs/api/"
def oracleLink = "<a href=\"(${oracleRoot})(.*?)\\?is-external=true\""
def oracleFixed = "<a href=\"\\1index.html\\?\\2\" target=\"_top\""
ant.replaceregexp(atch:oracleLink, replace:oracleFixed, flags:'g') {
ant.replaceregexp(match:oracleLink, replace:oracleFixed, flags:'g') {
fileset(dir: "${javadocPath}", includes: "**/*.html")
}
// Remove date metadata that changes every time Javadoc is generated.