From 459d2f6b8915b9c0cbcd89b24825d412a6739838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez=20Gonzales?= Date: Mon, 19 Sep 2022 04:55:58 -0500 Subject: [PATCH] Use `testCompileOnly` instead of `testCompileClasspath` (#5849) `testCompileClasspath` is deprecated. Also, removing `org.jetbrains:annotations` from `selenium` module. --- core/build.gradle | 2 +- modules/selenium/build.gradle | 1 - .../org/testcontainers/junit/BaseWebDriverContainerTest.java | 2 -- modules/spock/build.gradle | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index c9dd720e2a3..4072c25db37 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -63,7 +63,7 @@ dependencies { api 'junit:junit:4.13.2' api 'org.slf4j:slf4j-api:2.0.0' compileOnly 'org.jetbrains:annotations:23.0.0' - testCompileClasspath 'org.jetbrains:annotations:23.0.0' + testCompileOnly 'org.jetbrains:annotations:23.0.0' api 'org.apache.commons:commons-compress:1.21' api ('org.rnorth.duct-tape:duct-tape:1.0.8') { exclude(group: 'org.jetbrains', module: 'annotations') diff --git a/modules/selenium/build.gradle b/modules/selenium/build.gradle index 38fab63dc0a..3e5a80a2dfa 100644 --- a/modules/selenium/build.gradle +++ b/modules/selenium/build.gradle @@ -13,5 +13,4 @@ dependencies { testImplementation 'org.assertj:assertj-core:3.23.1' compileOnly 'org.jetbrains:annotations:23.0.0' - testCompileClasspath 'org.jetbrains:annotations:23.0.0' } diff --git a/modules/selenium/src/test/java/org/testcontainers/junit/BaseWebDriverContainerTest.java b/modules/selenium/src/test/java/org/testcontainers/junit/BaseWebDriverContainerTest.java index c49e24ba867..0ce20ca9800 100644 --- a/modules/selenium/src/test/java/org/testcontainers/junit/BaseWebDriverContainerTest.java +++ b/modules/selenium/src/test/java/org/testcontainers/junit/BaseWebDriverContainerTest.java @@ -1,6 +1,5 @@ package org.testcontainers.junit; -import org.jetbrains.annotations.NotNull; import org.junit.ClassRule; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; @@ -51,7 +50,6 @@ protected void assertBrowserNameIs(BrowserWebDriverContainer rule, String exp assertThat(actual).as(String.format("actual browser name is %s", actual)).isEqualTo(expectedName); } - @NotNull private static RemoteWebDriver setupDriverFromRule(BrowserWebDriverContainer rule) { RemoteWebDriver driver = rule.getWebDriver(); driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); diff --git a/modules/spock/build.gradle b/modules/spock/build.gradle index a437ff5b502..a13a7049e13 100644 --- a/modules/spock/build.gradle +++ b/modules/spock/build.gradle @@ -18,7 +18,7 @@ dependencies { testRuntimeOnly 'org.postgresql:postgresql:42.5.0' testRuntimeOnly 'mysql:mysql-connector-java:8.0.30' - testCompileClasspath 'org.jetbrains:annotations:23.0.0' + testCompileOnly 'org.jetbrains:annotations:23.0.0' } sourceJar {