| Nate Fischer | f39ab68 | 2019-07-01 17:13:08 -0700 | [diff] [blame] | 1 | # androidx.webkit |
| 2 | |
| Nate Fischer | a2d1ca6 | 2020-04-01 15:55:09 -0700 | [diff] [blame] | 3 | **See this page rendered in [Gitiles |
| Alan Viverette | 053e7e6 | 2020-12-15 10:22:06 -0500 | [diff] [blame] | 4 | markdown](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/webkit/README.md).** |
| Nate Fischer | a2d1ca6 | 2020-04-01 15:55:09 -0700 | [diff] [blame] | 5 | |
| Nate Fischer | f39ab68 | 2019-07-01 17:13:08 -0700 | [diff] [blame] | 6 | The androidx.webkit library is a static library you can add to your Android |
| 7 | application in order to use android.webkit APIs that are not available for older |
| 8 | platform versions. |
| 9 | |
| 10 | ## Basic info |
| 11 | |
| 12 | * [Library owners](OWNERS) |
| 13 | * [Release notes](https://developer.android.com/jetpack/androidx/releases/webkit) |
| Alan Viverette | 053e7e6 | 2020-12-15 10:22:06 -0500 | [diff] [blame] | 14 | * [Browse source](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/webkit/) |
| Nate Fischer | f39ab68 | 2019-07-01 17:13:08 -0700 | [diff] [blame] | 15 | * [Reference docs and guide to import the library](https://developer.android.com/reference/androidx/webkit/package-summary) |
| 16 | * [Existing open bugs](https://issuetracker.google.com/issues?q=componentid:460423%20status:open) |
| 17 | * [File a new bug](https://issuetracker.google.com/issues/new?component=460423) |
| 18 | |
| 19 | ## Building the library (for local development) |
| 20 | |
| 21 | If you're trying to modify the androidx.webkit library, or apply local changes |
| 22 | to the library, you can do so like so: |
| 23 | |
| 24 | ```sh |
| 25 | cd frameworks/support/ |
| 26 | # Build the library/compile changes |
| Peter Birk Pakkenberg | 68aa61f | 2023-05-04 17:53:10 +0100 | [diff] [blame] | 27 | ./gradlew :webkit:webkit:assembleDebug |
| Nate Fischer | f39ab68 | 2019-07-01 17:13:08 -0700 | [diff] [blame] | 28 | # Run integration tests with the WebView installed on the device |
| Peter Birk Pakkenberg | 68aa61f | 2023-05-04 17:53:10 +0100 | [diff] [blame] | 29 | ./gradlew :webkit:integration-tests:instrumentation:connectedAndroidTest |
| Nate Fischer | f39ab68 | 2019-07-01 17:13:08 -0700 | [diff] [blame] | 30 | # Update API files (only necessary if you changed public APIs) |
| Peter Birk Pakkenberg | 68aa61f | 2023-05-04 17:53:10 +0100 | [diff] [blame] | 31 | ./gradlew :webkit:webkit:updateApi |
| Nate Fischer | f39ab68 | 2019-07-01 17:13:08 -0700 | [diff] [blame] | 32 | ``` |
| 33 | |
| 34 | For more a detailed developer guide, Googlers should read |
| 35 | http://go/wvsl-contribute. |
| 36 | |
| Peter Birk Pakkenberg | 68aa61f | 2023-05-04 17:53:10 +0100 | [diff] [blame] | 37 | ## Instrumentation tests |
| 38 | The instrumentation tests for `androidx.webkit` are located in the |
| 39 | `:webkit:integration-tests:instrumentation` project. The tests have been split out into a separate |
| 40 | project to facilitate testing against different targetSdk versions. |
| 41 | |
| 42 | Any new tests should be added to that project. To run the test, use the command above. |
| 43 | |
| Nate Fischer | f39ab68 | 2019-07-01 17:13:08 -0700 | [diff] [blame] | 44 | ## API demo code |
| 45 | |
| 46 | We also maintain a demo app ([demo |
| 47 | code](/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit), |
| 48 | [developer guide](/webkit/integration-tests/testapp/README.md)) to demonstrate |
| 49 | how to properly use the latest androidx.webkit APIs in your Android app. |