docs: Add documentation on espressoBuildConfig capability
MODIFY
docs/en/writing-running-appium/caps.md
docs/en/writing-running-appium/caps.md
@@ -164,8 +164,53 @@ These Capabilities are available only on the [Espresso Driver](/docs/en/drivers/
|Capability|Description|Values|
|----|-----------|-------|
-|`espressoServerLaunchTimeout`|Timeout in milliseconds used to wait for an espresso server to launch. Defaults to `30000` |e.g., `50000`|
+|`espressoServerLaunchTimeout`|Timeout in milliseconds used to wait for the Espresso server to launch. Defaults to `30000` |e.g., `50000`|
+|`espressoBuildConfig`|Path to the Espresso server build configuration JSON (see below)|e.g., `/projects/myapp-tests/buildconfig.json`|
+|`showGradleLog`|Whether to pipe Gradle build log for the Espresso server to the Appium log. Defaults to `false`|e.g., `true`|
+##### Espresso server build configuration JSON
+Passing this configuration file using `espressoBuildConfig` desired capability allows to fine-tune the build process of the Espresso server. It is mostly useful in cases where the default Espresso server settings are not compatible with your application under test.
+ One example of such a case is tests crashing due to `Resource <name> is not a Drawable` error (see https://github.com/appium/appium-espresso-driver/issues/449 for discussion).
+
+Configuration example:
+```json
+{
+ "toolsVersions": {
+ "gradle": "5.1.1",
+ "androidGradlePlugin": "3.4.2",
+ "compileSdk": 28,
+ "buildTools": "28.0.3",
+ "minSdk": 18,
+ "targetSdk": 28,
+ "kotlin": "1.3.31"
+ },
+ "additionalAppDependencies": [
+ "com.google.android.material:material:1.0.0"
+ ]
+}
+```
+
+***Version settings***
+
+`toolsVersion` specifies versions of various tools and SDKs used during the building process of the Espresso server. Default versions are the versions used to build the Espresso driver without build configuration JSON.
+
+The module versions enumerated under `toolsVersion` are only used to build the server APK. They don't affect the manifest of your application under test or the Espresso server manifest (that is still generated from the manifest of your application under test).
+
+|Setting|Description|Values|
+|----|-----------|-------|
+|`gradle`|Gradle version|e.g.,`5.1.1`|
+|`androidGradlePlugin`|Android Gradle Plugin version|e.g., `3.4.2`|
+|`buildTools`|Version of the Android SDK build tools that should be used to compile the Espresso server (corresponds to `buildToolsVersion` in Gradle build files)|e.g., `28.0.3`|
+|`compileSdk`|Android API level that should be used to compile the Espresso server (corresponds to `compileSdkVersion` in Gradle build files)|e.g., `28`|
+|`minSdk`|Minimum Android API level required to run the application under tests, affects compatibility libraries used to build the Espresso server (corresponds to `minSdk` in Gradle build files)|e.g., `18`|
+|`targetSdk`|Android API level used to test the app (corresponds to `targetSdk` in Gradle build files)|e.g., `28`|
+|`kotlin`|Version of Kotlin compiler and official libraries|e.g., `1.3.311`|
+
+***Application dependencies***
+
+`additionalAppDependencies` array specifies additional dependencies of the application under test that build tools should know about when building the Espresso server. For example: `[ "com.google.android.material:material:1.0.0" ]`.
+
+Items belonging to this array are translated to `implementation` lines in Gradle build files of the Espresso server.
### iOS Only

docs: Add documentation on espressoBuildConfig capability (#13766)