Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make compose and kotlin dependencies version configurable #760

Merged
merged 1 commit into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions espresso-server/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ android {
}
}

val kotlinVersion = rootProject.extra["appiumKotlin"]
val composeVersion = getStringProperty("appiumComposeVersion", Version.compose)

dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
// additionalAppDependencies placeholder (don't change or delete this line)
Expand All @@ -105,11 +108,11 @@ dependencies {
testImplementation("org.mockito:mockito-core:${Version.mockito}")
testImplementation("org.nanohttpd:nanohttpd-webserver:${Version.nanohttpd}")
testImplementation("org.robolectric:robolectric:${Version.robolectric}")
testImplementation("org.jetbrains.kotlin:kotlin-test:${Version.kotlin}")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:${Version.kotlin}")
testImplementation("org.jetbrains.kotlin:kotlin-reflect:${Version.kotlin}")
testImplementation("androidx.compose.ui:ui-test:${Version.compose}")
testImplementation("androidx.compose.ui:ui-test-junit4:${Version.compose}")
testImplementation("org.jetbrains.kotlin:kotlin-test:${kotlinVersion}")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion")
testImplementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
testImplementation("androidx.compose.ui:ui-test:${composeVersion}")
testImplementation("androidx.compose.ui:ui-test-junit4:${composeVersion}")

androidTestImplementation("androidx.annotation:annotation:${Version.annotation}")
androidTestImplementation("androidx.test.espresso:espresso-contrib:${Version.espresso}") {
Expand All @@ -124,10 +127,10 @@ dependencies {
androidTestImplementation("androidx.test:rules:${Version.testlib}")
androidTestImplementation("com.google.code.gson:gson:${Version.gson}")
androidTestImplementation("org.nanohttpd:nanohttpd-webserver:${Version.nanohttpd}")
androidTestImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${Version.kotlin}")
androidTestImplementation("org.jetbrains.kotlin:kotlin-reflect:${Version.kotlin}")
androidTestImplementation("androidx.compose.ui:ui-test:${Version.compose}")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:${Version.compose}"){
androidTestImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
androidTestImplementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
androidTestImplementation("androidx.compose.ui:ui-test:${composeVersion}")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:${composeVersion}"){
isTransitive = false
}

Expand All @@ -139,7 +142,6 @@ tasks.withType<Test> {
}

object Version {
const val kotlin = "1.5.10"
const val espresso = "3.4.0"
const val testlib = "1.4.0"
const val mocklib = "2.0.9"
Expand Down
17 changes: 9 additions & 8 deletions espresso-server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

val appiumKotlin =
properties.getOrDefault("appiumKotlin", "1.5.10")

val appiumAndroidGradlePlugin =
properties.getOrDefault("appiumAndroidGradlePlugin", "7.0.3")
extra.apply {
set("appiumKotlin", properties.getOrDefault("appiumKotlin", "1.5.10"))
set(
"appiumAndroidGradlePlugin",
properties.getOrDefault("appiumAndroidGradlePlugin", "7.0.3")
)
}

repositories {
google()
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$appiumKotlin")
classpath("com.android.tools.build:gradle:$appiumAndroidGradlePlugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.extra["appiumKotlin"]}")
classpath("com.android.tools.build:gradle:${rootProject.extra["appiumAndroidGradlePlugin"]}")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle.kts files
Expand Down
3 changes: 2 additions & 1 deletion lib/server-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const VERSION_KEYS = [
'kotlin',
'sourceCompatibility',
'targetCompatibility',
'jvmTarget'
'jvmTarget',
'composeVersion'
];

const gradleLog = logger.getLogger('Gradle');
Expand Down