Upgrade to ArchUnit 1.4
Closes gh-45474
This commit is contained in:
@@ -31,7 +31,7 @@ dependencies {
|
||||
implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}")
|
||||
implementation("com.github.node-gradle:gradle-node-plugin:3.5.1")
|
||||
implementation("com.gradle:develocity-gradle-plugin:3.17.2")
|
||||
implementation("com.tngtech.archunit:archunit:1.3.0")
|
||||
implementation("com.tngtech.archunit:archunit:1.4.1")
|
||||
implementation("commons-codec:commons-codec:${commonsCodecVersion}")
|
||||
implementation("de.undercouch.download:de.undercouch.download.gradle.plugin:5.5.0")
|
||||
implementation("dev.adamko.dokkatoo:dokkatoo-plugin:2.3.1")
|
||||
|
||||
@@ -47,7 +47,7 @@ dependencies {
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation("com.fasterxml.jackson.core:jackson-databind")
|
||||
testImplementation("com.fasterxml.jackson.module:jackson-module-parameter-names")
|
||||
testImplementation("com.tngtech.archunit:archunit-junit5:0.22.0")
|
||||
testImplementation("com.tngtech.archunit:archunit-junit5:1.4.0")
|
||||
testImplementation("net.java.dev.jna:jna-platform")
|
||||
testImplementation("org.apache.commons:commons-compress")
|
||||
testImplementation("org.apache.httpcomponents.client5:httpclient5")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,10 +19,10 @@ package org.springframework.boot.gradle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.tngtech.archunit.base.DescribedPredicate;
|
||||
import com.tngtech.archunit.base.Predicate;
|
||||
import com.tngtech.archunit.core.domain.JavaClasses;
|
||||
import com.tngtech.archunit.core.domain.JavaMethodCall;
|
||||
import com.tngtech.archunit.core.domain.JavaType;
|
||||
@@ -75,9 +75,9 @@ class TaskConfigurationAvoidanceTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(JavaMethodCall methodCall) {
|
||||
public boolean test(JavaMethodCall methodCall) {
|
||||
for (Predicate<JavaMethodCall> spec : this.prohibited) {
|
||||
if (spec.apply(methodCall)) {
|
||||
if (spec.test(methodCall)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,7 @@ class TaskConfigurationAvoidanceTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(JavaMethodCall methodCall) {
|
||||
public boolean test(JavaMethodCall methodCall) {
|
||||
return methodCall.getTargetOwner().isEquivalentTo(this.owner) && methodCall.getName().equals(this.name);
|
||||
}
|
||||
|
||||
@@ -135,8 +135,8 @@ class TaskConfigurationAvoidanceTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(JavaMethodCall methodCall) {
|
||||
return super.apply(methodCall) && match(methodCall.getTarget().getParameterTypes());
|
||||
public boolean test(JavaMethodCall methodCall) {
|
||||
return super.test(methodCall) && match(methodCall.getTarget().getParameterTypes());
|
||||
}
|
||||
|
||||
private boolean match(List<JavaType> callParameterTypes) {
|
||||
|
||||
Reference in New Issue
Block a user