Skip to content

Commit

Permalink
update mockito library for tests to 3.12.4 for jdk17 compatibility
Browse files Browse the repository at this point in the history
Remove unused dependencies that rely on older verison of mockito

Change-Id: I52608684aebff6dee44555b66ecb126d1e517435

GitOrigin-RevId: 306bb4b0e3e11e7e9fe5d0f5d3cbdf1362b20655
  • Loading branch information
jrlogsdon authored and intellij-monorepo-bot committed Aug 11, 2022
1 parent d522247 commit f4d7420
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 26 deletions.
14 changes: 7 additions & 7 deletions .idea/libraries/mockito.xml

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

2 changes: 1 addition & 1 deletion android-uitests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ maven_repository(
"@maven//:org.jetbrains.kotlin.kotlin-script-runtime_1.7.0",
"@maven//:org.jetbrains.kotlin.kotlin-stdlib-jdk7_1.4.32",
"@maven//:org.jetbrains.kotlin.kotlin-stdlib-jdk8_1.7.0",
"@maven//:org.mockito.mockito-core_3.0.0",
"@maven//:org.mockito.mockito-core_3.12.4",
],
)

Expand Down
2 changes: 1 addition & 1 deletion android/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ maven_repository(
"@maven//:org.jetbrains.kotlin.kotlin-stdlib-jdk7_1.4.32",
"@maven//:org.jetbrains.kotlin.kotlin-stdlib-jdk8_1.4.31",
"@maven//:org.jetbrains.kotlin.kotlin-stdlib-jdk8_1.5.21",
"@maven//:org.mockito.mockito-core_3.0.0",
"@maven//:org.mockito.mockito-core_3.12.4",
"@maven//:xmlpull.xmlpull_1.1.3.1",
],
# Do not change: this target is explicitly marked private to avoid bloat.
Expand Down
2 changes: 1 addition & 1 deletion android/testData/projects/unitTesting/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:3.0.0'
testImplementation 'org.mockito:mockito-core:3.12.4'
testImplementation 'org.jdeferred:jdeferred-android-aar:1.2.3'
testImplementation 'commons-logging:commons-logging:1.1.1'
}
2 changes: 1 addition & 1 deletion android/testData/projects/unitTesting/javalib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: "kotlin"
dependencies {
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation "junit:junit:4.12"
testImplementation 'org.mockito:mockito-core:3.0.0'
testImplementation 'org.mockito:mockito-core:3.12.4'
}

sourceCompatibility = "1.7"
Expand Down
2 changes: 1 addition & 1 deletion android/testData/projects/unitTesting/lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:3.0.0'
testImplementation 'org.mockito:mockito-core:3.12.4'
testImplementation 'org.jdeferred:jdeferred-android-aar:1.2.3'
testImplementation 'commons-logging:commons-logging:1.1.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class ExtractVariableWorkerTest : AndroidGradleTestCase() {
val project = PsProjectImpl(resolvedProject)
val appModule = project.findModuleByName("app") as PsAndroidModule
val junit = appModule.dependencies.findLibraryDependencies("junit:junit:4.12").firstOrNull()
val mockito = appModule.dependencies.findLibraryDependencies("org.mockito:mockito-core:3.0.0").firstOrNull()
val mockito = appModule.dependencies.findLibraryDependencies("org.mockito:mockito-core:3.12.4").firstOrNull()

assertThat(junit, notNullValue())
assertThat(mockito, notNullValue())
Expand All @@ -192,11 +192,11 @@ class ExtractVariableWorkerTest : AndroidGradleTestCase() {
val (newName, newProperty) = worker.changeScope(appModule.variables, "")
assertThat(newName, equalTo("mockitoCoreVersion"))
assertThat(newProperty.getParsedValue(),
equalTo<Annotated<ParsedValue<String>>>(ParsedValue.Set.Parsed("3.0.0", DslText.Literal).annotated()))
equalTo<Annotated<ParsedValue<String>>>(ParsedValue.Set.Parsed("3.12.4", DslText.Literal).annotated()))
worker.commit("mockitoCoreVersion")

assertThat(appModule.variables.getOrCreateVariable("mockitoCoreVersion").value,
equalTo<ParsedValue<Any>>(ParsedValue.Set.Parsed("3.0.0", DslText.Literal)))
equalTo<ParsedValue<Any>>(ParsedValue.Set.Parsed("3.12.4", DslText.Literal)))
}
}

Expand All @@ -207,7 +207,7 @@ class ExtractVariableWorkerTest : AndroidGradleTestCase() {
val project = PsProjectImpl(resolvedProject)
val javaModule = project.findModuleByName("javalib") as PsJavaModule
val junit = javaModule.dependencies.findLibraryDependencies("junit:junit:4.12").firstOrNull()
val mockito = javaModule.dependencies.findLibraryDependencies("org.mockito:mockito-core:3.0.0").firstOrNull()
val mockito = javaModule.dependencies.findLibraryDependencies("org.mockito:mockito-core:3.12.4").firstOrNull()

assertThat(junit, notNullValue())
assertThat(mockito, notNullValue())
Expand All @@ -231,11 +231,11 @@ class ExtractVariableWorkerTest : AndroidGradleTestCase() {
val (newName, newProperty) = worker.changeScope(javaModule.variables, "")
assertThat(newName, equalTo("mockitoCoreVersion"))
assertThat(newProperty.getParsedValue(),
equalTo<Annotated<ParsedValue<String>>>(ParsedValue.Set.Parsed("3.0.0", DslText.Literal).annotated()))
equalTo<Annotated<ParsedValue<String>>>(ParsedValue.Set.Parsed("3.12.4", DslText.Literal).annotated()))
worker.commit("mockitoCoreVersion")

assertThat(javaModule.variables.getOrCreateVariable("mockitoCoreVersion").value,
equalTo<ParsedValue<Any>>(ParsedValue.Set.Parsed("3.0.0", DslText.Literal)))
equalTo<ParsedValue<Any>>(ParsedValue.Set.Parsed("3.12.4", DslText.Literal)))
}
}

Expand Down
3 changes: 1 addition & 2 deletions databinding/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,13 @@ maven_repository(
"@maven//:com.google.auto.value.auto-value_1.6.2",
"@maven//:com.google.errorprone.error_prone_annotations_2.3.2",
"@maven//:com.google.jimfs.jimfs_1.1",
"@maven//:com.linkedin.dexmaker.dexmaker-mockito_2.19.0",
"@maven//:com.sun.activation.javax.activation_1.2.0",
"@maven//:commons-lang.commons-lang_2.4",
"@maven//:javax.annotation.jsr250-api_1.0",
"@maven//:org.codehaus.mojo.animal-sniffer-annotations_1.17",
"@maven//:org.jetbrains.kotlin.kotlin-reflect_1.4.32",
"@maven//:org.jetbrains.kotlin.kotlin-stdlib-jdk7_1.4.32",
"@maven//:org.mockito.mockito-core_3.0.0",
"@maven//:org.mockito.mockito-core_3.12.4",
"@maven//:xmlpull.xmlpull_1.1.3.1",
],
)
2 changes: 1 addition & 1 deletion ide-perf-tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,6 @@ maven_repository(
"@maven//:javax.annotation.javax.annotation-api_1.2",
"@maven//:junit.junit_4.13.2",
"@maven//:org.jdeferred.jdeferred-android-aar_1.2.3",
"@maven//:org.mockito.mockito-core_3.0.0",
"@maven//:org.mockito.mockito-core_3.12.4",
],
)
2 changes: 1 addition & 1 deletion kotlin-integration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ maven_repository(
"@maven//:org.hamcrest.hamcrest-integration_1.3",
"@maven//:org.jdeferred.jdeferred-android-aar_1.2.3",
"@maven//:org.jetbrains.intellij.deps.trove4j_1.0.20181211",
"@maven//:org.mockito.mockito-core_3.0.0",
"@maven//:org.mockito.mockito-core_3.12.4",
],
)
2 changes: 1 addition & 1 deletion project-system-gradle-psd/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ maven_repository(
"@maven//:org.jetbrains.kotlin.kotlin-stdlib-jdk8_1.5.0",
"@maven//:org.jetbrains.kotlinx.kotlinx-coroutines-android_1.5.2",
"@maven//:org.jetbrains.kotlinx.kotlinx-coroutines-core_1.5.2",
"@maven//:org.mockito.mockito-core_3.0.0",
"@maven//:org.mockito.mockito-core_3.12.4",
"@maven//:xmlpull.xmlpull_1.1.3.1",
],
)
2 changes: 1 addition & 1 deletion project-system-gradle/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ maven_repository(
"@maven//:org.jetbrains.kotlin.kotlin-stdlib-js_1.7.0",
"@maven//:org.jetbrains.kotlinx.kotlinx-coroutines-android_1.5.2",
"@maven//:org.jetbrains.kotlinx.kotlinx-coroutines-core_1.5.2",
"@maven//:org.mockito.mockito-core_3.0.0",
"@maven//:org.mockito.mockito-core_3.12.4",
"@maven//:xmlpull.xmlpull_1.1.3.1",
],
)
2 changes: 0 additions & 2 deletions sync-perf-tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,8 @@ maven_repository(
"@maven//:com.android.support.test.espresso.espresso-core_3.0.2",
"@maven//:com.android.support.test.uiautomator.uiautomator-v18_2.1.1",
"@maven//:com.android.tools.build.gradle_7.1.0",
"@maven//:com.facebook.testing.screenshot.core_0.2.3",
"@maven//:com.google.android.android_4.1.1.4",
"@maven//:com.google.auto.value.auto-value_1.4-rc1",
"@maven//:com.google.dexmaker.dexmaker-mockito_1.2",
"@maven//:com.google.guava.guava_19.0",
"@maven//:com.jakewharton.auto.value.auto-value-annotations_1.2-update1",
"@maven//:io.opentracing.opentracing-impl_0.13.0",
Expand Down

0 comments on commit f4d7420

Please sign in to comment.