Upstream WebView developer documentation |
||
Issue descriptionWe currently have a lot of non-public docs at http://go/clank-webview. I believe it's time to upstream most of the content (the stuff that applies to upstream builds). * First and foremost, Android WebView is (mostly) an open source project. We should have high quality developer documentation available to the public. * Docs should live near code, so we may atomically update behavior and docs. * Markdown looks nice and is easy to write. Google sites is difficult to format consistently. * Clank has some upstream documentation (see [1]). If we upstream our docs, then we can improve the upstream clank docs by linking to WebView-specific build steps. * Other (incl. googler) chromium developers know about chromium markdown docs, or could easily stumble upon them from codesearch. * Committing docs to version control lets us track contributions to quality docs and review content changes as they go in. I propose we add docs under //src/android_webview/docs/ to avoid cluttering the top-level //src/docs/. We may want to follow-up with //src/android_webview/docs/OWNERS to permit any committer to LGTM changes, but I think there's value upstreaming content even if we don't do this. Lastly, I'm leaving this ticket open, because I think anyone should feel free to upstream content as appropriate. --- Some content is confidential, and some content is inapplicable to non-googlers. For the purpose of this crbug, I suggest we leave those docs where they are for the time being. [1] https://chromium.googlesource.com/chromium/src/+/HEAD/docs/android_build_instructions.md
,
Jan 9
,
Jan 11
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ae5fd322fd40d5a4cfd6ae4bc6bb828b189512ac commit ae5fd322fd40d5a4cfd6ae4bc6bb828b189512ac Author: Nate Fischer <ntfschr@chromium.org> Date: Fri Jan 11 07:33:18 2019 Docs: document target_cpu in Android steps This updates Android build documentation for the `target_cpu` option, and provides guidance for how to determine this value. This setting is arm-by-default for Android development. Although this is OK for Chrome for Android developers, it doesn't work for several use-cases: * Doesn't work for WebView on arm64 devices (which are increasingly popular) * Doesn't work for tests on arm64 devices (e.g., webview_instrumentation_apk) * Doesn't work for non-arm at all (e.g., x86-based emulator) Although there's a low cost to setting `target_cpu`, there's a high cost to omitting it (a mistake requires a full rebuild). And, since it's not obvious when the default is insufficient, this provides guidance for how to set it correctly for a given device. This also changes from `gn gen --args` to `gn args`. The motivation is: * It's convenient to call out `target_cpu` with an inline comment * `gn args` is a convenient command for complex configs, and isn't significantly worse for the recommended simple config * IMO it's easier to find docs for `gn args` (`gn help args`) than `--args` (it's not obvious it's a global option, and lives under `gn help switches`) This edits a bullet about default settings. Although it's true that `target_os` and `target_cpu` default to `host_os` and `host_cpu`, this is not relevant to Android development, since we always override these values. R=agrieve@chromium.org Bug: 918221 Test: N/A Change-Id: Ie4b8eab491fd8b860420dbba6dac6badc16b9f76 Reviewed-on: https://chromium-review.googlesource.com/c/1401981 Commit-Queue: Nate Fischer <ntfschr@chromium.org> Reviewed-by: agrieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#621936} [modify] https://crrev.com/ae5fd322fd40d5a4cfd6ae4bc6bb828b189512ac/docs/android_build_instructions.md
,
Jan 11
I wrote up some tips (googlers only, sorry) for markdown docs. Hope this helps both docs-writers and docs-reviewers! https://docs.google.com/document/d/1WL78mEDRDZPDmvDy6zCSZo09Q-qLd_o8XM4erE3EKqA/edit?usp=sharing
,
Jan 11
Nate, if you didn't know this already, you can create docs under your chromium.org account if you want to be able to share them publicly - chromium.org allows public sharing unlike corp.
,
Jan 12
^ Yeah, I'm aware. I felt that, limiting to only team member eyes, I might sneak by with a less-polished guide. And, I'd like to be able to link to google-only tools, for convenience. External contributors should feel encouraged to consult the plethora of markdown guides available on the open internet.
,
Jan 16
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/867117c34fa14b304e20c3088ef79e29e5275bc9 commit 867117c34fa14b304e20c3088ef79e29e5275bc9 Author: Nate Fischer <ntfschr@chromium.org> Date: Wed Jan 16 02:24:33 2019 AW docs: upstream docs to run tests This adds an upstream guide to run WebView tests, and also discusses other tests which WebView has (CTS, AndroidX). This is mostly a copy of the non-public guide at http://go/clank-webview/building-webview/android_webview-tests, but intentionally skips the following information: * Building WebView, monochrome stuff, etc. (that deserves its own doc) * Building the shell browser (that deserves its own doc) * gdb and valgrind (I don't think any active team members use these for tests, but we can follow-up later if I'm mistaken) * Configuring GN to build, setting up a device (I'll write proper docs for these) * Actually contributing to CTS (we don't actively support public contributions) * Actually contributing to AndroidX tests (I'd rather document this in a separate CL) R=tobiasjs@chromium.org Bug: 918221 Test: Run some of the instructions, they work Change-Id: Ic50ec666bb4a34ebcb60ab750a3ed3f8a209dc56 Reviewed-on: https://chromium-review.googlesource.com/c/1399053 Commit-Queue: Nate Fischer <ntfschr@chromium.org> Reviewed-by: Tobias Sargeant <tobiasjs@chromium.org> Cr-Commit-Position: refs/heads/master@{#623051} [add] https://crrev.com/867117c34fa14b304e20c3088ef79e29e5275bc9/android_webview/docs/test-instructions.md
,
Jan 17
(5 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1112f262a247db25d7eac3dd6fbd1e802740b335 commit 1112f262a247db25d7eac3dd6fbd1e802740b335 Author: Nate Fischer <ntfschr@chromium.org> Date: Thu Jan 17 18:45:06 2019 AW docs: use gitiles features in markdown This switches gitiles callouts to emphasize notes. This also fixes a typo. R=torne@chromium.org Bug: 918221 Test: Upload to gerrit > open file > click "gitiles" Change-Id: Ide74948eb391e306fad7895f7abda00c1029aa24 Reviewed-on: https://chromium-review.googlesource.com/c/1417353 Reviewed-by: Richard Coles <torne@chromium.org> Commit-Queue: Nate Fischer <ntfschr@chromium.org> Cr-Commit-Position: refs/heads/master@{#623767} [modify] https://crrev.com/1112f262a247db25d7eac3dd6fbd1e802740b335/android_webview/docs/commandline-flags.md |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Jan 3