Skip to content

Commit

Permalink
Merge pull request #97 from Malinskiy/feature/deps-update
Browse files Browse the repository at this point in the history
feat(adam): update to kotlin 1.8.10, kotlin language 1.8 and gradle 8.1
  • Loading branch information
Malinskiy authored Apr 25, 2023
2 parents cda378f + 4f3a844 commit 28dd793
Show file tree
Hide file tree
Showing 19 changed files with 70 additions and 60 deletions.
6 changes: 4 additions & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 6 additions & 11 deletions adam/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import com.google.protobuf.gradle.id
import com.google.protobuf.gradle.remove

/*
* Copyright (C) 2021 Anton Malinskiy
*
Expand All @@ -14,14 +17,6 @@
* limitations under the License.
*/

import com.google.protobuf.gradle.builtins
import com.google.protobuf.gradle.generateProtoTasks
import com.google.protobuf.gradle.id
import com.google.protobuf.gradle.plugins
import com.google.protobuf.gradle.protobuf
import com.google.protobuf.gradle.protoc
import com.google.protobuf.gradle.remove

plugins {
kotlin("jvm")
id("jacoco")
Expand Down Expand Up @@ -109,7 +104,7 @@ val jacocoIntegrationTestReport = task<JacocoReport>("jacocoIntegrationTestRepor
description = "Generates code coverage report for integrationTest task"
group = "verification"
reports {
xml.isEnabled = true
xml.required.set(true)
}

executionData(integrationTest)
Expand All @@ -130,7 +125,7 @@ val jacocoCombinedTestReport = task<JacocoReport>("jacocoCombinedTestReport") {

tasks.jacocoTestReport {
reports {
xml.isEnabled = true
xml.required.set(true)
}
}

Expand All @@ -146,7 +141,7 @@ java {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.apiVersion = "1.5"
kotlinOptions.languageVersion = "1.5"
kotlinOptions.languageVersion = "1.8"
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ import com.malinskiy.adam.request.logcat.SyncLogcatRequest
import com.malinskiy.adam.request.prop.GetSinglePropRequest
import com.malinskiy.adam.request.shell.v1.ShellCommandRequest
import com.malinskiy.adam.rule.AdbDeviceRule
import kotlinx.coroutines.Deferred
import kotlinx.coroutines.async
import kotlinx.coroutines.debug.junit4.CoroutinesTimeout
import kotlinx.coroutines.delay
import kotlinx.coroutines.isActive
import kotlinx.coroutines.runBlocking
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.MatcherAssert.assertThat
Expand Down Expand Up @@ -94,9 +96,10 @@ class LogcatE2ETest {

val content = mutableSetOf<LogLine.Log>()
val channel = adb.adb.execute(request, this, adb.deviceSerial)
async {
delay(100)
for (i in 1..10) {

val background: Deferred<Unit> = async {
while (isActive) {
delay(100)
//Produce artificial message in logcat
adb.adb.execute(ShellCommandRequest("log -t TEST_TAG \"Test message\""), adb.deviceSerial)
}
Expand All @@ -112,6 +115,7 @@ class LogcatE2ETest {
delay(100)
}
channel.cancel()
background.cancel()

val zonedInstant = nowInstant.atZone(deviceTimezone.toZoneId()).minusSeconds(5)
assertThat(content.all { it.instant.isAfter(zonedInstant) }, equalTo(true))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ class AdbDeviceRule(val deviceType: DeviceType = DeviceType.ANY, vararg val requ
device.serial.startsWith("emulator-")
)
}

DeviceType.ANY -> Unit
}

supportedFeatures = adb.execute(FetchDeviceFeaturesRequest(device.serial))
Expand Down
8 changes: 5 additions & 3 deletions android-junit4-test-annotation-producer/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ plugins {
}

android {
compileSdk = 30
namespace = "com.malinskiy.adam.junit4.android.listener"

compileSdk = 33

defaultConfig {
minSdk = 14
targetSdk = 30
targetSdk = 33
}

sourceSets {
Expand All @@ -50,7 +52,7 @@ java {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.apiVersion = "1.5"
kotlinOptions.languageVersion = "1.5"
kotlinOptions.languageVersion = "1.8"
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
~ limitations under the License.
-->

<manifest package="com.malinskiy.adam.junit4.android.listener">
<manifest>

<application/>
<application />
</manifest>
8 changes: 5 additions & 3 deletions android-junit4/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ plugins {
}

android {
compileSdk = 30
namespace = "com.malinskiy.adam.junit4.android"

compileSdk = 33

defaultConfig {
minSdk = 14
targetSdk = 30
targetSdk = 33
}

sourceSets {
Expand All @@ -50,7 +52,7 @@ java {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.apiVersion = "1.5"
kotlinOptions.languageVersion = "1.5"
kotlinOptions.languageVersion = "1.8"
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions android-junit4/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
~ limitations under the License.
-->

<manifest package="com.malinskiy.adam.junit4.android">
<manifest>

<application/>
<application />
</manifest>
2 changes: 1 addition & 1 deletion android-testrunner-contract/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ java {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.apiVersion = "1.5"
kotlinOptions.languageVersion = "1.5"
kotlinOptions.languageVersion = "1.8"
}

Deployment.initialize(project)
8 changes: 5 additions & 3 deletions androidx-screencapture/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ plugins {
}

android {
compileSdk = 30
namespace = "com.malinskiy.adam.junit4.android.screencapture"

compileSdk = 33

defaultConfig {
minSdk = 14
targetSdk = 30
targetSdk = 33
}

sourceSets {
Expand All @@ -50,7 +52,7 @@ java {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.apiVersion = "1.5"
kotlinOptions.languageVersion = "1.5"
kotlinOptions.languageVersion = "1.8"
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions androidx-screencapture/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
~ limitations under the License.
-->

<manifest package="com.malinskiy.adam.junit4.android.screencapture">
<manifest>

<application/>
<application />
</manifest>
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import java.util.*

buildscript {
repositories {
Expand All @@ -16,7 +17,7 @@ plugins {
}

fun isNonStable(version: String): Boolean {
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) }
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase(Locale.ENGLISH).contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(version)
return isStable.not()
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ repositories {

dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin")
implementation("com.android.tools.build:gradle:7.0.4")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.6.10")
implementation("com.android.tools.build:gradle:7.4.1")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.8.10")
}
32 changes: 16 additions & 16 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
object Versions {
val adam = System.getenv("GIT_TAG_NAME") ?: "0.4.7"
val kotlin = "1.6.21"
val adam = System.getenv("GIT_TAG_NAME") ?: "0.5.1"
val kotlin = "1.8.10"
val coroutines = "1.6.4"
val coroutinesDebug = coroutines

val annotations = "23.0.0"
val ktor = "2.0.3"
val logging = "2.1.23"
val vertx = "4.3.3"
val annotations = "24.0.1"
val ktor = "2.3.0"
val logging = "3.0.5"
val vertx = "4.4.1"
val apacheCommonsPool2 = "2.11.1"

val assertk = "0.25"
val junit4 = "4.13.2"
val junit5 = "5.9.0"
val junit5commons = "1.9.0"
val junit5 = "5.9.2"
val junit5commons = "1.9.2"
val imageComparison = "4.4.0"
val dokka = kotlin

val grpc = "1.49.0"
val grpc = "1.54.1"
val grpcKotlin = "1.3.0"
val grpcOkhttp = "1.49.0"
val protobufGradle = "0.8.19"
val protobuf = "3.21.5"
val grpcOkhttp = "1.54.1"
val protobufGradle = "0.9.2"
val protobuf = "3.22.3"
val javax = "1.3.2"

val androidGradle = "7.2.2"
val testMonitor = "1.5.0"
val testRunner = "1.4.0"
val gradleVersionsPlugin = "0.42.0"
val androidGradle = "7.4.1"
val testMonitor = "1.6.1"
val testRunner = "1.5.2"
val gradleVersionsPlugin = "0.46.0"
}

object BuildPlugins {
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 @@
#Sun Aug 04 13:21:59 AEST 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
4 changes: 2 additions & 2 deletions server/server-stub-junit4/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Deployment.initialize(project)

tasks.jacocoTestReport {
reports {
xml.isEnabled = true
xml.required.set(true)
}
}

Expand All @@ -35,7 +35,7 @@ java {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.apiVersion = "1.5"
kotlinOptions.languageVersion = "1.5"
kotlinOptions.languageVersion = "1.8"
}

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions server/server-stub-junit5/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Deployment.initialize(project)

tasks.jacocoTestReport {
reports {
xml.isEnabled = true
xml.required.set(true)
}
}

Expand All @@ -35,7 +35,7 @@ java {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.apiVersion = "1.5"
kotlinOptions.languageVersion = "1.5"
kotlinOptions.languageVersion = "1.8"
}

dependencies {
Expand Down
6 changes: 3 additions & 3 deletions server/server-stub/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ val jacocoIntegrationTestReport = task<JacocoReport>("jacocoIntegrationTestRepor
description = "Generates code coverage report for integrationTest task"
group = "verification"
reports {
xml.isEnabled = true
xml.required.set(true)
}

executionData(integrationTest)
Expand All @@ -67,7 +67,7 @@ tasks.check { dependsOn(integrationTest, jacocoIntegrationTestReport) }

tasks.jacocoTestReport {
reports {
xml.isEnabled = true
xml.required.set(true)
}
}

Expand All @@ -79,7 +79,7 @@ java {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.apiVersion = "1.5"
kotlinOptions.languageVersion = "1.5"
kotlinOptions.languageVersion = "1.8"
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion transport-ktor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ java {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.apiVersion = "1.5"
kotlinOptions.languageVersion = "1.5"
kotlinOptions.languageVersion = "1.8"
}

dependencies {
Expand Down

0 comments on commit 28dd793

Please sign in to comment.