Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3bcc5b5a authored by Tobias Thierer's avatar Tobias Thierer Committed by android-build-merger
Browse files

Merge "Merge "Refactoring: Rewrite links in Metalava instead of carrying...

Merge "Merge "Refactoring: Rewrite links in Metalava instead of carrying patches." am: 21558d75 am: 02a8e8c7 am: 7e61c246" into qt-r1-dev-plus-aosp
am: f353c4ec

Change-Id: I2a6a84fdde128b727886697352535b4312dcf511
parents 0294d305 f353c4ec
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -1299,6 +1299,21 @@ metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.x
    "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
    "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo "

// http://b/129765390 Rewrite links to "platform" or "technotes" folders
// which are siblings (and thus outside of) {@docRoot}.
//
// We have to escape \ as \\ and $ as $$ here because they get resolved by
// different layers of the build tooling. The arguments are wrapped in '' so
// that the shell doesn't add yet another level of escaping.
metalava_framework_docs_args += " --replace-documentation " +
    // packages whose descendants to apply replacement to (all packages from
    // libcore/ojluni/src/main/java that contribute to documentation).
    "com.sun:java:javax:jdk.net:sun " +
    // regex of the string to replace
    "'(<a\\s+href\\s?=[\\*\\s]*\")(?:(?:\\{@docRoot\\}/\\.\\./)|(?:(?:\\.\\./)+))((?:platform|technotes).+)\">' " +
    // replacement (with $1, $2 backreferences to the regex groups)
    "'$$1https://docs.oracle.com/javase/8/docs/$$2\">' "

stubs_defaults {
    name: "framework-doc-stubs-default",
    srcs: [