Skip to content

Commit

Permalink
chore(all): update dependencies (#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
Malinskiy authored Jul 31, 2023
1 parent 0354fc9 commit b4490b1
Show file tree
Hide file tree
Showing 18 changed files with 81 additions and 49 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ buildscript {


plugins {
id("io.gitlab.arturbosch.detekt") version "1.22.0"
id("com.github.ben-manes.versions") version "0.46.0"
id("io.gitlab.arturbosch.detekt") version "1.23.1"
id("com.github.ben-manes.versions") version "0.47.0"
}

configure<DetektExtension> {
Expand Down
36 changes: 18 additions & 18 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
object Versions {
val marathon = System.getenv("GIT_TAG_NAME") ?: "0.8.2"

val kotlin = "1.8.10"
val coroutines = "1.6.4"
val kotlin = "1.8.20"
val coroutines = "1.7.3"
val coroutinesTest = coroutines

val androidCommon = "31.0.0"
val androidCommon = "31.1.0"
val adam = "0.5.1"
val dexTestParser = "2.3.4"
val kotlinLogging = "3.0.5"
val logbackClassic = "1.4.7"
val logbackClassic = "1.4.8"
val axmlParser = "1.0"
val bugsnag = "3.6.4"
val bugsnag = "3.7.0"

val junitGradle = "1.2.0"
val androidGradleVersion = "7.4.1"
val gradlePluginPublish = "1.2.0"
val gradlePluginShadow = "7.1.2"
val gradlePluginShadow = "8.1.1"

val junit5 = "5.9.2"
val kluent = "1.72"
val junit5 = "5.10.0"
val kluent = "1.73"

val kakao = "3.0.2"
val espresso = "3.0.1"
Expand All @@ -30,34 +30,34 @@ object Versions {
val apacheCommonsText = "1.10.0"
val apacheCommonsIO = "2.11.0"
val apacheCommonsCodec = "1.15"
val okhttp = "4.10.0"
val okhttp = "4.11.0"
val influxDbClient = "2.23"
val influxDb2Client = "6.8.0"
val clikt = "3.5.2"
val jacksonDatabind = "2.14.2"
val influxDb2Client = "6.10.0"
val clikt = "4.1.0"
val jacksonDatabind = "2.15.2"
val jacksonKotlin = jacksonDatabind
val jacksonYaml = jacksonDatabind
val jacksonJSR310 = jacksonDatabind
val jacksonAnnotations = jacksonDatabind
val ddPlist = "1.27"
val guava = "31.1-jre"
val guava = "32.1.1-jre"
val rsync4j = "3.2.7-1"
val sshj = "0.35.0"
val kotlinProcess = "1.4.1"
val testContainers = "1.18.0"
val testContainers = "1.18.3"
val jupiterEngine = junit5
val jansi = "2.4.0"
val scalr = "4.2"
val allureTestFilter = "2.21.0"
val allureJava = "2.21.0"
val allureTestFilter = "2.23.0"
val allureJava = "2.23.0"
val allureKotlin = "2.4.0"
val allureEnvironment = "1.0.0"
val mockitoKotlin = "2.2.0"
val dokka = "1.8.10"
val koin = "3.4.0"
val koin = "3.4.3"
val jsonAssert = "1.5.1"
val xmlUnit = "2.9.1"
val assertk = "0.25"
val assertk = "0.26.1"
}

object BuildPlugins {
Expand Down
2 changes: 1 addition & 1 deletion cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
jacoco
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.dokka")
id("com.github.gmazzo.buildconfig") version "4.0.1"
id("com.github.gmazzo.buildconfig") version "4.1.2"
}

val enableJDB = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ private fun execute(cliConfiguration: CliConfiguration) {
marathon.run(marathonStartConfiguration.executionCommand)
} catch (e: Exception) {
logger.error(e) {}
throw PrintMessage(message = "Marathon execution crashed", error = true)
throw PrintMessage(message = "Marathon execution crashed", statusCode = 1, printError = true)
}

when {
success -> throw PrintMessage(message = "Marathon execution finished", error = false)
configuration.ignoreFailures -> throw PrintMessage(message = "Marathon execution finished with failures (Failures suppressed because ignoreFailures is `true`)", error = false)
else -> throw PrintMessage(message = "Marathon execution failed", error = true)
success -> throw PrintMessage(message = "Marathon execution finished", statusCode = 1, printError = false)
configuration.ignoreFailures -> throw PrintMessage(message = "Marathon execution finished with failures (Failures suppressed because ignoreFailures is `true`)", statusCode = 1, printError = true)
else -> throw PrintMessage(message = "Marathon execution failed", statusCode = 1, printError = true)
}
} finally {
stopKoin()
Expand Down
2 changes: 1 addition & 1 deletion configuration/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.dokka")
jacoco
id("com.github.gmazzo.buildconfig") version "4.0.1"
id("com.github.gmazzo.buildconfig") version "4.1.2"
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.dokka")
jacoco
id("com.github.gmazzo.buildconfig") version "4.0.1"
id("com.github.gmazzo.buildconfig") version "4.1.2"
}

sourceSets {
Expand Down
40 changes: 22 additions & 18 deletions core/src/main/kotlin/com/malinskiy/marathon/Marathon.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import kotlinx.coroutines.withTimeoutOrNull
import org.koin.core.context.stopKoin
import java.util.concurrent.atomic.AtomicBoolean
import kotlin.coroutines.coroutineContext
import kotlin.system.measureTimeMillis

private val log = MarathonLogging.logger {}

Expand Down Expand Up @@ -100,27 +101,30 @@ class Marathon(
}

suspend fun runAsync(executionCommand: ExecutionCommand = MarathonRunCommand): Boolean {
configureLogging()

logSystemInformation()
configurationValidator.validate(configuration)

deviceProvider.initialize()
val parsedAllTests = when (testParser) {
is LocalTestParser -> testParser.extract()
is RemoteTestParser<*> -> {
withRetry(3, 0) {
withTimeoutOrNull(configuration.deviceInitializationTimeoutMillis) {
val borrowedDevice = deviceProvider.borrow()
testParser.extract(borrowedDevice)
} ?: throw NoDevicesException("Timed out waiting for a temporary device for remote test parsing")
var parsedAllTests: List<Test> = emptyList()
measureTimeMillis {
configureLogging()

logSystemInformation()
configurationValidator.validate(configuration)

deviceProvider.initialize()
parsedAllTests = when (testParser) {
is LocalTestParser -> testParser.extract()
is RemoteTestParser<*> -> {
withRetry(3, 0) {
withTimeoutOrNull(configuration.deviceInitializationTimeoutMillis) {
val borrowedDevice = deviceProvider.borrow()
testParser.extract(borrowedDevice)
} ?: throw NoDevicesException("Timed out waiting for a temporary device for remote test parsing")
}
}
}

else -> {
throw ConfigurationException("Unknown test parser type for ${testParser::class}, should inherit from either ${LocalTestParser::class.simpleName} or ${RemoteTestParser::class.simpleName}")
else -> {
throw ConfigurationException("Unknown test parser type for ${testParser::class}, should inherit from either ${LocalTestParser::class.simpleName} or ${RemoteTestParser::class.simpleName}")
}
}
}
}.let { println("Took $it ms") }

usageTracker.meta(
version = BuildConfig.VERSION, releaseMode = BuildConfig.RELEASE_MODE, vendor = when (configuration.vendorConfiguration) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
@file:OptIn(ExperimentalCoroutinesApi::class, ExperimentalTime::class)

package com.malinskiy.marathon.scenario

import com.malinskiy.marathon.device.DeviceProvider
import com.malinskiy.marathon.execution.TestStatus
import com.malinskiy.marathon.test.StubDevice
import com.malinskiy.marathon.test.assert.shouldBeEqualToAsJson
import com.malinskiy.marathon.test.setupMarathon
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.advanceTimeBy
Expand All @@ -14,6 +17,7 @@ import org.junit.jupiter.api.AfterEach
import org.junit.jupiter.api.Test
import org.koin.core.context.stopKoin
import java.io.File
import kotlin.time.ExperimentalTime
import com.malinskiy.marathon.test.Test as MarathonTest

class DeviceFilteringScenarioTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalCoroutinesApi::class, ExperimentalTime::class)

package com.malinskiy.marathon.scenario

import com.malinskiy.marathon.device.DeviceProvider
Expand All @@ -8,6 +10,7 @@ import com.malinskiy.marathon.test.setupMarathon
import com.malinskiy.marathon.time.Timer
import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.whenever
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
Expand All @@ -19,6 +22,7 @@ import org.junit.jupiter.api.Test
import org.koin.core.context.stopKoin
import java.io.File
import java.util.concurrent.TimeUnit
import kotlin.time.ExperimentalTime
import com.malinskiy.marathon.test.Test as MarathonTest

class DisconnectingScenariosTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalCoroutinesApi::class, ExperimentalTime::class)

package com.malinskiy.marathon.scenario

import com.malinskiy.marathon.config.exceptions.ConfigurationException
Expand All @@ -7,6 +9,7 @@ import com.malinskiy.marathon.device.DeviceProvider
import com.malinskiy.marathon.execution.TestStatus
import com.malinskiy.marathon.test.StubDevice
import com.malinskiy.marathon.test.setupMarathon
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.advanceTimeBy
Expand All @@ -18,6 +21,7 @@ import org.junit.jupiter.api.assertThrows
import org.koin.core.context.stopKoin
import java.io.File
import java.time.Instant
import kotlin.time.ExperimentalTime
import com.malinskiy.marathon.test.Test as MarathonTest

class InvalidConfigScenariosTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
@file:OptIn(ExperimentalCoroutinesApi::class, ExperimentalTime::class)

package com.malinskiy.marathon.scenario

import com.malinskiy.marathon.config.ParseCommand
import com.malinskiy.marathon.device.DeviceProvider
import com.malinskiy.marathon.execution.TestStatus
import com.malinskiy.marathon.test.StubDevice
import com.malinskiy.marathon.test.setupMarathon
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
Expand All @@ -17,6 +20,7 @@ import org.junit.jupiter.api.Test
import org.koin.core.context.stopKoin
import java.io.File
import java.util.concurrent.TimeUnit
import kotlin.time.ExperimentalTime
import com.malinskiy.marathon.test.Test as MarathonTest

class SuccessParseScenarioTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
@file:OptIn(ExperimentalCoroutinesApi::class, ExperimentalTime::class)

package com.malinskiy.marathon.scenario

import com.malinskiy.marathon.device.DeviceProvider
import com.malinskiy.marathon.execution.TestStatus
import com.malinskiy.marathon.test.StubDevice
import com.malinskiy.marathon.test.assert.shouldBeEqualToAsJson
import com.malinskiy.marathon.test.setupMarathon
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
Expand All @@ -16,6 +19,7 @@ import org.junit.jupiter.api.Test
import org.koin.core.context.stopKoin
import java.io.File
import java.util.concurrent.TimeUnit
import kotlin.time.ExperimentalTime
import com.malinskiy.marathon.test.Test as MarathonTest

class SuccessScenariosTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalCoroutinesApi::class, ExperimentalTime::class)

package com.malinskiy.marathon.scenario

import com.malinskiy.marathon.config.strategy.RetryStrategyConfiguration
Expand All @@ -9,6 +11,7 @@ import com.malinskiy.marathon.test.setupMarathon
import com.malinskiy.marathon.time.Timer
import com.nhaarman.mockitokotlin2.mock
import com.nhaarman.mockitokotlin2.whenever
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
Expand All @@ -20,6 +23,7 @@ import org.junit.jupiter.api.Test
import org.koin.core.context.stopKoin
import java.io.File
import java.util.concurrent.TimeUnit
import kotlin.time.ExperimentalTime
import com.malinskiy.marathon.test.Test as MarathonTest

class UncompletedScenariosTest {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion sample/android-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}

plugins {
id("com.github.ben-manes.versions") version "0.46.0"
id("com.github.ben-manes.versions") version "0.47.0"
}

fun isNonStable(version: String): Boolean {
Expand Down
2 changes: 1 addition & 1 deletion sample/android-cucumber-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}

plugins {
id("com.github.ben-manes.versions") version "0.46.0"
id("com.github.ben-manes.versions") version "0.47.0"
}

fun isNonStable(version: String): Boolean {
Expand Down
2 changes: 1 addition & 1 deletion sample/android-library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}

plugins {
id("com.github.ben-manes.versions") version "0.46.0"
id("com.github.ben-manes.versions") version "0.47.0"
}

fun isNonStable(version: String): Boolean {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@file:OptIn(ExperimentalTime::class)

package com.malinskiy.marathon.ios.cmd

import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.async
import kotlinx.coroutines.delay
import kotlinx.coroutines.runBlocking
Expand All @@ -13,6 +16,7 @@ import org.amshove.kluent.shouldNotBeEqualTo
import org.junit.jupiter.api.Test
import java.nio.charset.Charset
import java.time.Duration
import kotlin.time.ExperimentalTime

abstract class BaseCommandExecutorTest {
abstract fun createExecutor(): CommandExecutor
Expand Down

0 comments on commit b4490b1

Please sign in to comment.