Skip to content

Commit

Permalink
feat: add ability to customize espresso version (#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
sravanmedarapu committed Mar 29, 2023
1 parent ec25550 commit 8b62ecb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ minSdk | Minimum Android SDK version to compile the server for. By default the v
targetSdk | Target Android SDK version to compile the server for. By default the version from the app [build.gradle.kts](https://github.com/appium/appium-espresso-driver/blob/master/espresso-server/app/build.gradle.kts) is used | 28
kotlin | Kotlin version to compile the server for. By default the version from the [build.gradle.kts](https://github.com/appium/appium-espresso-driver/blob/master/espresso-server/build.gradle.kts) is used | '1.3.72'
composeVersion | The version for the Jetpack Compose dependencies to use for Espresso server building. By default the version from the [build.gradle.kts](https://github.com/appium/appium-espresso-driver/blob/master/espresso-server/build.gradle.kts) is used | '1.1.1'
espressoVersion | The version for the Espresso dependencies to use for Espresso server building. By default the version from the [build.gradle.kts](https://github.com/appium/appium-espresso-driver/blob/master/espresso-server/build.gradle.kts) is used | '3.5.0'
sourceCompatibility | The minimum version of JVM the project sources are compatible with. The default value is `VERSION_1_8` | VERSION_12
targetCompatibility | The target version of JVM the project sources are compatible with. The default value is `VERSION_1_8` | VERSION_12
jvmTarget | Target version of the generated JVM bytecode as a string. The default value is `1_8` | `1_10`
Expand Down
11 changes: 6 additions & 5 deletions espresso-server/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ android {

val kotlinVersion = rootProject.extra["appiumKotlin"]
val composeVersion = getStringProperty("appiumComposeVersion", Version.compose)
val espressoVersion = getStringProperty("appiumEspressoVersion", Version.espresso)
val annotationVersion = getStringProperty("appiumAnnotationVersion", Version.annotation)

dependencies {
Expand All @@ -97,9 +98,9 @@ dependencies {
testImplementation("org.powermock:powermock-module-junit4-rule:${Version.mocklib}")
testImplementation("org.powermock:powermock-module-junit4:${Version.mocklib}")
testImplementation("androidx.annotation:annotation:${annotationVersion}")
testImplementation("androidx.test.espresso:espresso-contrib:${Version.espresso}")
testImplementation("androidx.test.espresso:espresso-core:${Version.espresso}")
testImplementation("androidx.test.espresso:espresso-web:${Version.espresso}")
testImplementation("androidx.test.espresso:espresso-contrib:${espressoVersion}")
testImplementation("androidx.test.espresso:espresso-core:${espressoVersion}")
testImplementation("androidx.test.espresso:espresso-web:${espressoVersion}")
testImplementation("androidx.test.uiautomator:uiautomator:${Version.uia}")
testImplementation("androidx.test:core:${Version.testlib}")
testImplementation("androidx.test:runner:${Version.testlib}")
Expand All @@ -116,12 +117,12 @@ dependencies {
testImplementation("androidx.compose.ui:ui-test-junit4:${composeVersion}")

androidTestImplementation("androidx.annotation:annotation:${annotationVersion}")
androidTestImplementation("androidx.test.espresso:espresso-contrib:${Version.espresso}") {
androidTestImplementation("androidx.test.espresso:espresso-contrib:${espressoVersion}") {
// Exclude transitive dependencies to limit conflicts with AndroidX libraries from AUT.
// Link to PR with fix and discussion https://github.com/appium/appium-espresso-driver/pull/596
isTransitive = false
}
androidTestImplementation("androidx.test.espresso:espresso-web:${Version.espresso}") {
androidTestImplementation("androidx.test.espresso:espresso-web:${espressoVersion}") {
because("Espresso Web Atoms support (mobile: webAtoms)")
}
androidTestImplementation("androidx.test.uiautomator:uiautomator:${Version.uia}") {
Expand Down
1 change: 1 addition & 0 deletions lib/server-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const VERSION_KEYS = [
'targetCompatibility',
'jvmTarget',
'composeVersion',
'espressoVersion',
'annotationVersion'
];

Expand Down

0 comments on commit 8b62ecb

Please sign in to comment.