Make javadoc links point to Android docs for java.* classes
Before: https://docs.oracle.com/javase/7/docs/api/index.html?java/lang/String.html After: https://developer.android.com/reference/java/lang/String.html PiperOrigin-RevId: 304137011
This commit is contained in:
parent
45186ac377
commit
cd5ecd5c90
@ -29,8 +29,7 @@ class CombinedJavadocPlugin implements Plugin<Project> {
|
|||||||
classpath = project.files([])
|
classpath = project.files([])
|
||||||
destinationDir = project.file("$project.buildDir/docs/javadoc")
|
destinationDir = project.file("$project.buildDir/docs/javadoc")
|
||||||
options {
|
options {
|
||||||
links "https://docs.oracle.com/javase/7/docs/api/",
|
links "https://developer.android.com/reference"
|
||||||
"https://developer.android.com/reference"
|
|
||||||
encoding = "UTF-8"
|
encoding = "UTF-8"
|
||||||
}
|
}
|
||||||
exclude "**/BuildConfig.java"
|
exclude "**/BuildConfig.java"
|
||||||
|
@ -26,9 +26,7 @@ android.libraryVariants.all { variant ->
|
|||||||
title = "ExoPlayer ${javadocTitle}"
|
title = "ExoPlayer ${javadocTitle}"
|
||||||
source = allSourceDirs
|
source = allSourceDirs
|
||||||
options {
|
options {
|
||||||
links "http://docs.oracle.com/javase/7/docs/api/"
|
links "https://developer.android.com/reference"
|
||||||
linksOffline "https://developer.android.com/reference",
|
|
||||||
"${android.sdkDirectory}/docs/reference"
|
|
||||||
encoding = "UTF-8"
|
encoding = "UTF-8"
|
||||||
}
|
}
|
||||||
exclude "**/BuildConfig.java"
|
exclude "**/BuildConfig.java"
|
||||||
|
@ -20,13 +20,6 @@ ext.fixJavadoc = {
|
|||||||
ant.replaceregexp(match:androidLink, replace:androidFixed, flags:'g') {
|
ant.replaceregexp(match:androidLink, replace:androidFixed, flags:'g') {
|
||||||
fileset(dir: "${javadocPath}", includes: "**/*.html")
|
fileset(dir: "${javadocPath}", includes: "**/*.html")
|
||||||
}
|
}
|
||||||
// Fix external Oracle links to use frames and target the top frame.
|
|
||||||
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(match:oracleLink, replace:oracleFixed, flags:'g') {
|
|
||||||
fileset(dir: "${javadocPath}", includes: "**/*.html")
|
|
||||||
}
|
|
||||||
// Add favicon to each page
|
// Add favicon to each page
|
||||||
def headTag = "<head>"
|
def headTag = "<head>"
|
||||||
def headTagWithFavicon = "<head>" +
|
def headTagWithFavicon = "<head>" +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user