Skip to content

Commit

Permalink
Merge branch 'main' into renovate/com.github.spotbugs-6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Jan 2, 2025
2 parents 433ed77 + 1db6626 commit 50c6fa7
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `jackson` version to latest `2.18.0` -> `2.18.1`. ([#2319](https://github.com/diffplug/spotless/pull/2319))
* Bump default `ktfmt` version to latest `0.52` -> `0.53`. ([#2320](https://github.com/diffplug/spotless/pull/2320))
* Bump default `ktlint` version to latest `1.4.0` -> `1.5.0`. ([#2354](https://github.com/diffplug/spotless/pull/2354))
* Bump minimum `eclipse-cdt` version to `11.0` (removed support for `10.7`). ([#2373](https://github.com/diffplug/spotless/pull/2373))
### Fixed
* You can now use `removeUnusedImports` and `googleJavaFormat` at the same time again. (fixes [#2159](https://github.com/diffplug/spotless/issues/2159))
* The default list of type annotations used by `formatAnnotations` now includes Jakarta Validation's `Valid` and constraints validations (fixes [#2334](https://github.com/diffplug/spotless/issues/2334))


## [3.0.0.BETA4] - 2024-10-24
### Added
* APIs to support linting. (implemented in [#2148](https://github.com/diffplug/spotless/pull/2148), [#2149](https://github.com/diffplug/spotless/pull/2149), [#2307](https://github.com/diffplug/spotless/pull/2307))
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ VER_SLF4J=[1.6,2.0[
VER_DURIAN=1.2.0
VER_JGIT=6.10.0.202406032230-r
VER_JUNIT=5.11.4
VER_ASSERTJ=3.26.3
VER_ASSERTJ=3.27.1
VER_MOCKITO=5.14.2
VER_SELFIE=2.4.1
VER_SELFIE=2.4.2
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 1 addition & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
14 changes: 9 additions & 5 deletions lib-extra/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def NEEDS_P2_DEPS = [
'groovy',
'jdt'
]
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
NEEDS_P2_DEPS.remove('cdt')
}
for (needsP2 in NEEDS_P2_DEPS) {
sourceSets.register(needsP2) {
compileClasspath += sourceSets.main.output
Expand All @@ -74,11 +77,12 @@ tasks.withType(Test).configureEach {

apply plugin: 'dev.equo.p2deps'
p2deps {
// (alphabetic order please)
into 'cdtCompileOnly', {
p2repo 'https://download.eclipse.org/eclipse/updates/4.26/'
p2repo 'https://download.eclipse.org/tools/cdt/releases/10.7/'
install 'org.eclipse.cdt.core'
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
into 'cdtCompileOnly', {
p2repo 'https://download.eclipse.org/eclipse/updates/4.26/'
p2repo 'https://download.eclipse.org/tools/cdt/releases/11.0/'
install 'org.eclipse.cdt.core'
}
}
into 'groovyCompileOnly', {
p2repo 'https://download.eclipse.org/eclipse/updates/4.26/'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2024 DiffPlug
* Copyright 2016-2025 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,7 +38,7 @@ public final class EclipseCdtFormatterStep {
private EclipseCdtFormatterStep() {}

private static final String NAME = "eclipse cdt formatter";
private static final Jvm.Support<String> JVM_SUPPORT = Jvm.<String> support(NAME).add(11, "10.7").add(17, "11.6");
private static final Jvm.Support<String> JVM_SUPPORT = Jvm.<String> support(NAME).add(17, "11.6");

public static String defaultVersion() {
return JVM_SUPPORT.getRecommendedFormatterVersion();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2024 DiffPlug
* Copyright 2016-2025 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,11 @@
*/
package com.diffplug.spotless.extra.cpp;

import static org.junit.jupiter.api.condition.JRE.JAVA_17;

import java.util.stream.Stream;

import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

Expand All @@ -30,13 +33,14 @@ public EclipseCdtFormatterStepTest() {

@ParameterizedTest
@MethodSource
@EnabledForJreRange(min = JAVA_17)
void formatWithVersion(String version) throws Exception {
harnessFor(version).test("main.c",
"#include <a.h>;\nint main(int argc, \nchar *argv[]) {}",
"#include <a.h>;\nint main(int argc, char *argv[]) {\n}\n");
}

private static Stream<String> formatWithVersion() {
return Stream.of("10.6", "10.7", EclipseCdtFormatterStep.defaultVersion());
return Stream.of("11.0", "11.6", EclipseCdtFormatterStep.defaultVersion());
}
}
1 change: 1 addition & 0 deletions plugin-gradle/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `jackson` version to latest `2.18.0` -> `2.18.1`. ([#2319](https://github.com/diffplug/spotless/pull/2319))
* Bump default `ktfmt` version to latest `0.52` -> `0.53`. ([#2320](https://github.com/diffplug/spotless/pull/2320))
* Bump default `ktlint` version to latest `1.4.0` -> `1.5.0`. ([#2354](https://github.com/diffplug/spotless/pull/2354))
* Bump minimum `eclipse-cdt` version to `11.0` (removed support for `10.7`). ([#2373](https://github.com/diffplug/spotless/pull/2373))
### Fixed
* You can now use `removeUnusedImports` and `googleJavaFormat` at the same time again. (fixes [#2159](https://github.com/diffplug/spotless/issues/2159))
* The default list of type annotations used by `formatAnnotations` now includes Jakarta Validation's `Valid` and constraints validations (fixes [#2334](https://github.com/diffplug/spotless/issues/2334))
Expand Down
1 change: 1 addition & 0 deletions plugin-maven/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `jackson` version to latest `2.18.0` -> `2.18.1`. ([#2319](https://github.com/diffplug/spotless/pull/2319))
* Bump default `ktfmt` version to latest `0.52` -> `0.53`. ([#2320](https://github.com/diffplug/spotless/pull/2320))
* Bump default `ktlint` version to latest `1.4.0` -> `1.5.0`. ([#2354](https://github.com/diffplug/spotless/pull/2354))
* Bump minimum `eclipse-cdt` version to `11.0` (removed support for `10.7`). ([#2373](https://github.com/diffplug/spotless/pull/2373))
### Fixed
* You can now use `removeUnusedImports` and `googleJavaFormat` at the same time again. (fixes [#2159](https://github.com/diffplug/spotless/issues/2159))
* The default list of type annotations used by `formatAnnotations` now includes Jakarta Validation's `Valid` and constraints validations (fixes [#2334](https://github.com/diffplug/spotless/issues/2334))
Expand Down

0 comments on commit 50c6fa7

Please sign in to comment.