mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[gradle] [IDEA-330622] use Gradle 8.3 for tests
GitOrigin-RevId: d0531e4bf18079d4ba38f08a480e3966e809c7a5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7a08f04fcf
commit
ddbdfc76bc
@@ -27,6 +27,8 @@ abstract class GradleExecutionTestCase : GradleExecutionBaseTestCase() {
|
||||
return isGradleAtLeast("7.6")
|
||||
}
|
||||
|
||||
fun isTestLauncherUsed(): Boolean = isGradleAtLeast("8.3")
|
||||
|
||||
fun testJunit5Project(gradleVersion: GradleVersion, action: () -> Unit) {
|
||||
assumeThatJunit5IsSupported(gradleVersion)
|
||||
testJavaProject(gradleVersion, action)
|
||||
|
||||
@@ -350,7 +350,7 @@ class GradleTestAssertionTest : GradleExecutionTestCase() {
|
||||
""".trimMargin())
|
||||
}
|
||||
assertNode("test assert equals for objects") {
|
||||
if (isBuiltInTestEventsUsed()) {
|
||||
if (isBuiltInTestEventsUsed() && !isTestLauncherUsed()) {
|
||||
assertTestConsoleContains("""
|
||||
|
|
||||
|assertion message
|
||||
@@ -370,7 +370,7 @@ class GradleTestAssertionTest : GradleExecutionTestCase() {
|
||||
}
|
||||
}
|
||||
assertNode("test assert equals for same objects") {
|
||||
if (isBuiltInTestEventsUsed()) {
|
||||
if (isBuiltInTestEventsUsed() && !isTestLauncherUsed()) {
|
||||
assertTestConsoleContains("""
|
||||
|
|
||||
|assertion message
|
||||
|
||||
@@ -77,7 +77,12 @@ class GradleTestExecutionTest : GradleExecutionTestCase() {
|
||||
}
|
||||
}
|
||||
}
|
||||
assertNode("There were failing tests. See the report at: .*".toRegex())
|
||||
if (!isTestLauncherUsed()) {
|
||||
assertNode("There were failing tests. See the report at: .*".toRegex())
|
||||
}
|
||||
}
|
||||
if (isTestLauncherUsed()) {
|
||||
assertNode("Test failed.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-3
@@ -53,8 +53,9 @@ import static java.util.Collections.*;
|
||||
public final class DependencyResolverImpl implements DependencyResolver {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(DependencyResolverImpl.class);
|
||||
|
||||
private static final boolean IS_NEW_DEPENDENCY_RESOLUTION_APPLICABLE =
|
||||
GradleVersion.current().getBaseVersion().compareTo(GradleVersion.version("4.5")) >= 0;
|
||||
private static final GradleVersion GRADLE_BASE_VERSION = GradleVersion.current().getBaseVersion();
|
||||
private static final boolean IS_83_OR_BETTER = GRADLE_BASE_VERSION.compareTo(GradleVersion.version("8.3")) >= 0;
|
||||
private static final boolean IS_NEW_DEPENDENCY_RESOLUTION_APPLICABLE = GRADLE_BASE_VERSION.compareTo(GradleVersion.version("4.5")) >= 0;
|
||||
|
||||
private final @NotNull ModelBuilderContext myContext;
|
||||
private final @NotNull Project myProject;
|
||||
@@ -264,7 +265,14 @@ public final class DependencyResolverImpl implements DependencyResolver {
|
||||
}
|
||||
|
||||
ProjectComponentIdentifier projectComponentIdentifier = (ProjectComponentIdentifier)artifact.getId().getComponentIdentifier();
|
||||
String buildName = projectComponentIdentifier.getBuild().getName();
|
||||
BuildIdentifier buildIdentifier = projectComponentIdentifier.getBuild();
|
||||
String buildName;
|
||||
if (IS_83_OR_BETTER) {
|
||||
buildName = buildIdentifier.getBuildPath();
|
||||
}
|
||||
else {
|
||||
buildName = buildIdentifier.getName();
|
||||
}
|
||||
String projectPath = projectComponentIdentifier.getProjectPath();
|
||||
String key = buildName + "_" + projectPath + "_" + resolvedDependency.getConfiguration();
|
||||
DefaultExternalProjectDependency projectDependency = resolvedProjectDependencies.get(key);
|
||||
|
||||
+2
-2
@@ -32,9 +32,9 @@ public class VersionMatcherRule extends TestWatcher {
|
||||
"5.0", /*"5.1", "5.2", "5.3.1", "5.4.1", "5.5.1",*/ "5.6.2",
|
||||
"6.0", /* "6.0.1", "6.1", "6.2", "6.3", "6.4", "6.8.3", */ "6.9",
|
||||
"7.0.2", /* "7.1", "7.2", "7.4", "7.5.1", */ "7.6",
|
||||
"8.0", "8.2"
|
||||
"8.0", /*"8.2",*/ "8.3"
|
||||
};
|
||||
public static final String BASE_GRADLE_VERSION = "8.2";
|
||||
public static final String BASE_GRADLE_VERSION = "8.3";
|
||||
|
||||
@Nullable
|
||||
private CustomMatcher<String> myMatcher;
|
||||
|
||||
Reference in New Issue
Block a user