From 27f9e69722a2c65015053a4975584089a83cf6c3 Mon Sep 17 00:00:00 2001 From: Rafael Toledo Date: Thu, 31 Oct 2019 20:43:01 -0300 Subject: [PATCH] Update dependencies --- app/build.gradle.kts | 9 +++++---- gordon-plugin/build.gradle.kts | 8 ++++---- .../src/main/kotlin/com/banno/gordon/AdbExtensions.kt | 6 +++--- .../src/main/kotlin/com/banno/gordon/DevicePools.kt | 6 +++--- .../src/main/kotlin/com/banno/gordon/GordonTestTask.kt | 5 +++-- .../src/main/kotlin/com/banno/gordon/ManifestLoader.kt | 6 +++--- .../src/main/kotlin/com/banno/gordon/ReportFile.kt | 6 +++--- .../src/main/kotlin/com/banno/gordon/TestDistributor.kt | 2 +- .../src/main/kotlin/com/banno/gordon/TestRunner.kt | 2 +- .../src/main/kotlin/com/banno/gordon/TestSuiteLoader.kt | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 11 files changed, 28 insertions(+), 26 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index acace12..b47a209 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -7,10 +7,11 @@ plugins { } android { - compileSdkVersion(28) + compileSdkVersion(29) + buildToolsVersion("29.0.2") defaultConfig { minSdkVersion(21) - targetSdkVersion(28) + targetSdkVersion(29) applicationId = "com.banno.android.gordontest" versionCode = 1 versionName = "1.0" @@ -31,6 +32,6 @@ dependencies { implementation("androidx.constraintlayout:constraintlayout:1.1.3") implementation("com.google.android.material:material:1.0.0") - androidTestImplementation("androidx.test:runner:1.1.1") - androidTestImplementation("androidx.test.espresso:espresso-core:3.1.1") + androidTestImplementation("androidx.test:runner:1.2.0") + androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0") } diff --git a/gordon-plugin/build.gradle.kts b/gordon-plugin/build.gradle.kts index f0969d0..283cce6 100644 --- a/gordon-plugin/build.gradle.kts +++ b/gordon-plugin/build.gradle.kts @@ -16,7 +16,7 @@ repositories { dependencies { implementation(gradleKotlinDsl()) implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.12.0") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.13.0") implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.12") val androidGradlePluginVersion: String by project @@ -26,11 +26,11 @@ dependencies { implementation("org.smali:dexlib:1.4.2") implementation("com.shazam:axmlparser:1.0") - implementation("io.arrow-kt:arrow-core-data:0.9.0") - implementation("io.arrow-kt:arrow-effects-io-extensions:0.9.0") + implementation("io.arrow-kt:arrow-core-data:0.10.2") + implementation("io.arrow-kt:arrow-fx:0.10.2") testImplementation("junit:junit:4.12") - testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0") + testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0") } gradlePlugin { diff --git a/gordon-plugin/src/main/kotlin/com/banno/gordon/AdbExtensions.kt b/gordon-plugin/src/main/kotlin/com/banno/gordon/AdbExtensions.kt index 71de7ab..a33f0c4 100644 --- a/gordon-plugin/src/main/kotlin/com/banno/gordon/AdbExtensions.kt +++ b/gordon-plugin/src/main/kotlin/com/banno/gordon/AdbExtensions.kt @@ -1,7 +1,7 @@ package com.banno.gordon -import arrow.effects.IO -import arrow.effects.extensions.io.fx.fx +import arrow.fx.IO +import arrow.fx.extensions.fx import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart @@ -43,7 +43,7 @@ internal fun JadbDevice.executeShellWithTimeout( internal fun JadbDevice.isTablet(): IO = executeShellWithTimeout(20_000, "getprop", "ro.build.characteristics").map { it!!.contains("tablet") } -internal fun JadbDevice.installApk(apk: File, vararg options: String) = fx { +internal fun JadbDevice.installApk(apk: File, vararg options: String) = IO.fx { val remoteFile = RemoteFile("/data/local/tmp/" + apk.name) push(apk, remoteFile) diff --git a/gordon-plugin/src/main/kotlin/com/banno/gordon/DevicePools.kt b/gordon-plugin/src/main/kotlin/com/banno/gordon/DevicePools.kt index 91449b9..beedd0d 100644 --- a/gordon-plugin/src/main/kotlin/com/banno/gordon/DevicePools.kt +++ b/gordon-plugin/src/main/kotlin/com/banno/gordon/DevicePools.kt @@ -1,7 +1,7 @@ package com.banno.gordon -import arrow.effects.IO -import arrow.effects.extensions.io.fx.fx +import arrow.fx.IO +import arrow.fx.extensions.fx import se.vidstige.jadb.JadbConnection import se.vidstige.jadb.JadbDevice @@ -12,7 +12,7 @@ internal data class DevicePool( val devices: List ) -internal fun calculatePools(adb: JadbConnection, strategy: PoolingStrategy): IO> = fx { +internal fun calculatePools(adb: JadbConnection, strategy: PoolingStrategy): IO> = IO.fx { val allDevices = adb.getAllDevices().bind() when (strategy) { diff --git a/gordon-plugin/src/main/kotlin/com/banno/gordon/GordonTestTask.kt b/gordon-plugin/src/main/kotlin/com/banno/gordon/GordonTestTask.kt index cea76c6..8c711b4 100644 --- a/gordon-plugin/src/main/kotlin/com/banno/gordon/GordonTestTask.kt +++ b/gordon-plugin/src/main/kotlin/com/banno/gordon/GordonTestTask.kt @@ -1,6 +1,7 @@ package com.banno.gordon -import arrow.effects.extensions.io.fx.fx +import arrow.fx.IO +import arrow.fx.extensions.fx import kotlinx.coroutines.Dispatchers import org.gradle.api.DefaultTask import org.gradle.api.file.Directory @@ -64,7 +65,7 @@ internal abstract class GordonTestTask : DefaultTask() { @TaskAction private fun runTests() { - val runTests = fx { + val runTests = IO.fx { testResultsDirectory.get().asFile.clear().bind() reportDirectory.get().asFile.clear().bind() diff --git a/gordon-plugin/src/main/kotlin/com/banno/gordon/ManifestLoader.kt b/gordon-plugin/src/main/kotlin/com/banno/gordon/ManifestLoader.kt index b0bc9f5..e757c22 100644 --- a/gordon-plugin/src/main/kotlin/com/banno/gordon/ManifestLoader.kt +++ b/gordon-plugin/src/main/kotlin/com/banno/gordon/ManifestLoader.kt @@ -1,12 +1,12 @@ package com.banno.gordon -import arrow.effects.IO -import arrow.effects.extensions.io.fx.fx +import arrow.fx.IO +import arrow.fx.extensions.fx import com.shazam.axmlparser.AXMLParser import java.io.File import java.util.zip.ZipFile -internal fun getManifestPackage(apk: File): IO = fx { +internal fun getManifestPackage(apk: File): IO = IO.fx { val manifestPackage: String? = loadFromManifest(apk) { moveToTag("manifest") diff --git a/gordon-plugin/src/main/kotlin/com/banno/gordon/ReportFile.kt b/gordon-plugin/src/main/kotlin/com/banno/gordon/ReportFile.kt index ee73d40..d075c9b 100644 --- a/gordon-plugin/src/main/kotlin/com/banno/gordon/ReportFile.kt +++ b/gordon-plugin/src/main/kotlin/com/banno/gordon/ReportFile.kt @@ -1,7 +1,7 @@ package com.banno.gordon -import arrow.effects.IO -import arrow.effects.extensions.io.fx.fx +import arrow.fx.IO +import arrow.fx.extensions.fx import java.io.File internal data class ReportFile(val fileName: String, val fileContent: String) @@ -13,7 +13,7 @@ internal fun ReportFile.write(directory: File) = IO { .absolutePath } -internal fun List.write(directory: File) = fx { +internal fun List.write(directory: File) = IO.fx { forEach { it.write(directory).bind() } } diff --git a/gordon-plugin/src/main/kotlin/com/banno/gordon/TestDistributor.kt b/gordon-plugin/src/main/kotlin/com/banno/gordon/TestDistributor.kt index 1e648b9..3665a1e 100644 --- a/gordon-plugin/src/main/kotlin/com/banno/gordon/TestDistributor.kt +++ b/gordon-plugin/src/main/kotlin/com/banno/gordon/TestDistributor.kt @@ -1,6 +1,6 @@ package com.banno.gordon -import arrow.effects.IO +import arrow.fx.IO import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart diff --git a/gordon-plugin/src/main/kotlin/com/banno/gordon/TestRunner.kt b/gordon-plugin/src/main/kotlin/com/banno/gordon/TestRunner.kt index a1ad58e..118373a 100644 --- a/gordon-plugin/src/main/kotlin/com/banno/gordon/TestRunner.kt +++ b/gordon-plugin/src/main/kotlin/com/banno/gordon/TestRunner.kt @@ -37,7 +37,7 @@ internal fun runTest( logger.error("${device.serial}: $testName: UNABLE TO RUN") TestResult.NotRun } - ) { shellOutput -> + ) { shellOutput: String? -> val testTime = shellOutput ?.substringAfter("Time: ") ?.substringBefore("\n") diff --git a/gordon-plugin/src/main/kotlin/com/banno/gordon/TestSuiteLoader.kt b/gordon-plugin/src/main/kotlin/com/banno/gordon/TestSuiteLoader.kt index 3a59995..0dab7aa 100644 --- a/gordon-plugin/src/main/kotlin/com/banno/gordon/TestSuiteLoader.kt +++ b/gordon-plugin/src/main/kotlin/com/banno/gordon/TestSuiteLoader.kt @@ -1,6 +1,6 @@ package com.banno.gordon -import arrow.effects.IO +import arrow.fx.IO import org.jf.dexlib.AnnotationDirectoryItem import org.jf.dexlib.AnnotationItem import org.jf.dexlib.ClassDefItem diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 01a286e..674bdda 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip