Skip to content

Commit c4745d9

Browse files
Excavator: Upgrades Baseline to the latest version
1 parent 0df3f00 commit c4745d9

9 files changed

Lines changed: 183 additions & 25 deletions

File tree

.baseline/checkstyle/checkstyle.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@
2020
<property name="format" value="&gt;&gt;&gt;&gt;&gt;&gt;&gt;"/>
2121
<property name="message" value="Found (&gt;&gt;&gt;&gt;&gt;&gt;&gt;), so it looks like you had a merge conflict that compiles. Please fix it."/>
2222
</module>
23-
<module name="RegexpSingleline">
24-
<property name="format" value="\s+$"/>
25-
<property name="message" value="Whitespace at end-of-line"/>
26-
</module>
27-
<module name="RegexpMultiline"> <!-- Java Style Guide: Vertical Whitespace -->
28-
<property name="fileExtensions" value="java"/>
29-
<property name="format" value="^\n\n$"/>
30-
<property name="message" value="Two consecutive blank lines are not permitted."/>
31-
</module>
3223
<module name="SuppressionFilter"> <!-- baseline-gradle: README.md -->
3324
<property name="file" value="${config_loc}/checkstyle-suppressions.xml"/>
3425
</module>

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ buildscript {
1414
classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.90.0'
1515
classpath 'com.palantir.suppressible-error-prone:gradle-suppressible-error-prone:2.28.0'
1616
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:3.15.0'
17-
classpath 'com.palantir.baseline:gradle-baseline-java:6.72.0'
17+
classpath 'com.palantir.baseline:gradle-baseline-java:7.4.0'
1818
classpath 'com.palantir.gradle.gitversion:gradle-git-version:5.0.0'
1919
classpath 'com.palantir.gradle.guide:gradle-guide:1.25.0'
2020
classpath 'com.palantir.gradle.idea-configuration:gradle-idea-configuration:0.8.0'

discover-tests-cli/src/main/java/com/palantir/gradle/plugintesting/SubClassesOfCommand.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,15 @@ public FilterResult apply(TestDescriptor testDescriptor) {
6363
};
6464
}
6565

66-
@SuppressWarnings("for-rollout:StreamFlatMapOptional")
67-
static List<Class<?>> getClassesFrom(List<String> classNames) {
66+
static List<Class<?>> getClassesFrom(List<String> classNames) {
6867
return classNames.stream()
6968
.map(className -> {
7069
try {
7170
return Optional.of(Class.forName(className));
7271
} catch (ClassNotFoundException e) {
7372
return Optional.<Class<?>>empty();
7473
}
75-
})
76-
.filter(Optional::isPresent)
77-
.map(Optional::get)
74+
}).<? extends Class<?>>mapMulti(Optional::ifPresent)
7875
.collect(Collectors.toList());
7976
}
8077

discover-tests-cli/src/main/java/com/palantir/gradle/plugintesting/WithAnnotationsCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ private static boolean hasAnyClassAnnotations(
7171
return annotations.stream().anyMatch(annotation -> AnnotationSupport.isAnnotated(clazz, annotation));
7272
}
7373

74-
@SuppressWarnings({"BanSystemOut", "for-rollout:UnnecessarilyQualified"})
74+
@SuppressWarnings("BanSystemOut")
7575
private static Optional<Class<? extends Annotation>> getClassAnnotation(String annotationName) {
7676
try {
77-
return Optional.of((Class<? extends java.lang.annotation.Annotation>) Class.forName(annotationName));
77+
return Optional.of((Class<? extends Annotation>) Class.forName(annotationName));
7878
} catch (ClassNotFoundException e) {
7979
System.out.format(
8080
"Failed to retrieve the annotation class from the string name: %s, Skipping", annotationName);

gradle-plugin-testing/src/main/java/com/palantir/gradle/plugintesting/DiscoverTestClassesTask.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,10 @@ public abstract class DiscoverTestClassesTask extends JavaExec {
7272
@Inject
7373
public abstract ProjectLayout getProjectLayout();
7474

75-
@SuppressWarnings("for-rollout:MissingOverride")
76-
@Inject
75+
@Override @Inject
7776
public abstract ProviderFactory getProviderFactory();
7877

79-
@SuppressWarnings("for-rollout:MissingOverride")
80-
@Inject
78+
@Override @Inject
8179
public abstract ObjectFactory getObjectFactory();
8280

8381
public DiscoverTestClassesTask() {

gradle-plugin-testing/src/main/java/com/palantir/gradle/plugintesting/PluginTestingPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ public void apply(Project project) {
9191
});
9292
}
9393

94-
@SuppressWarnings("for-rollout:TaskDependsOn")
95-
private void doApply(Project project) {
94+
@SuppressWarnings("for-rollout:TaskDependsOn")
95+
private void doApply(Project project) {
9696
PluginTestingExtension testUtilsExt = project.getExtensions().getByType(PluginTestingExtension.class);
9797

9898
setupErrorprones(project);

gradle/exception

Lines changed: 171 additions & 0 deletions
Large diffs are not rendered by default.

plugin-testing-core/src/main/java/com/palantir/gradle/plugintesting/TestDependencyVersions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public static String resolve(String depName) {
6464
return depName + ":" + version(depName);
6565
}
6666

67-
@SuppressWarnings("for-rollout:PreferSafeLoggableExceptions")
68-
private static Map<String, String> loadVersions() {
67+
@SuppressWarnings("for-rollout:PreferSafeLoggableExceptions")
68+
private static Map<String, String> loadVersions() {
6969
String fileName = System.getProperty(TEST_DEPENDENCIES_FILE_SYSTEM_PROPERTY);
7070
if (fileName == null) {
7171
throw new IllegalStateException("No test dependencies file name found. Use the PluginTestingPlugin to set "

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ include 'configuration-cache-spec'
3131
include 'gradle-plugin-testing-error-prone'
3232
include 'gradle-plugin-testing-junit'
3333
include 'discover-tests-cli'
34+
throw new RuntimeException('''The excavator failed to run properly - exited with code 1 and output:\n\n''' + file('gradle/exception').text + '\n\n')

0 commit comments

Comments
 (0)