Skip to content

Commit

Permalink
Merge branch 'main' into renovate/com.diffplug.spotless-changelog-3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Aug 25, 2024
2 parents ad70544 + 25151c9 commit b008644
Show file tree
Hide file tree
Showing 21 changed files with 50 additions and 42 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/changelog-print.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@ jobs:
java-version: 11
distribution: 'temurin'
- name: gradle caching
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4
- run: ./gradlew changelogPrint
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ jobs:
distribution: "temurin"
java-version: 11
- name: gradle caching
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4
- name: spotlessCheck
run: ./gradlew spotlessCheck
- name: assemble testClasses
Expand Down Expand Up @@ -71,9 +69,7 @@ jobs:
distribution: "temurin"
java-version: ${{ matrix.jre }}
- name: gradle caching
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4
- name: build (maven-only)
if: matrix.kind == 'maven'
run: ./gradlew :plugin-maven:build -x spotlessCheck
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ jobs:
java-version: 11
distribution: 'temurin'
- name: gradle caching
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
uses: gradle/actions/setup-gradle@v4
- name: git fetch origin main
run: git fetch origin main
- name: publish all
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `greclipse` version to latest `4.29` -> `4.32`. ([#2179](https://github.com/diffplug/spotless/pull/2179), [#2190](https://github.com/diffplug/spotless/pull/2190))
* Bump default `cdt` version to latest `11.3` -> `11.6`. ([#2179](https://github.com/diffplug/spotless/pull/2179))
* Bump default `gson` version to latest `2.10.1` -> `2.11.0`. ([#2128](https://github.com/diffplug/spotless/pull/2128))
* Bump default `jackson` version to latest `2.17.1` -> `2.17.2`. ([#2195](https://github.com/diffplug/spotless/pull/2195))
* Bump default `cleanthat` version to latest `2.20` -> `2.21`. ([#2210](https://github.com/diffplug/spotless/pull/2210))
* Bump default `google-java-format` version to latest `1.22.0` -> `1.23.0`. ([#2212](https://github.com/diffplug/spotless/pull/2212))
### Fixed
* Fix compatibility issue introduced by `ktfmt` `0.51`. ([#2172](https://github.com/diffplug/spotless/issues/2172))
### Added
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ VER_SLF4J=[1.6,2.0[
# Used in multiple places
VER_DURIAN=1.2.0
VER_JGIT=6.10.0.202406032230-r
VER_JUNIT=5.10.3
VER_ASSERTJ=3.26.0
VER_JUNIT=5.11.0
VER_ASSERTJ=3.26.3
VER_MOCKITO=5.12.0
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 4 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -84,7 +86,8 @@ 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 "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
20 changes: 10 additions & 10 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ tasks.named("check").configure {
}

dependencies {
compileOnly 'org.slf4j:slf4j-api:2.0.0'
testCommonImplementation 'org.slf4j:slf4j-api:2.0.0'
compileOnly 'org.slf4j:slf4j-api:2.0.16'
testCommonImplementation 'org.slf4j:slf4j-api:2.0.16'

// zero runtime reqs is a hard requirements for spotless-lib
// if you need a dep, put it in lib-extra
Expand All @@ -80,7 +80,7 @@ dependencies {

// GLUE CODE (alphabetic order please)
// cleanthat
String VER_CLEANTHAT='2.20'
String VER_CLEANTHAT='2.21'
cleanthatCompileOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT"
compatCleanthat2Dot1CompileAndTestOnly "io.github.solven-eu.cleanthat:java:$VER_CLEANTHAT"
// diktat old supported version 1.x
Expand All @@ -91,13 +91,13 @@ dependencies {
flexmarkCompileOnly 'com.vladsch.flexmark:flexmark-all:0.64.8'
// gherkin
gherkinCompileOnly 'io.cucumber:gherkin-utils:9.0.0'
gherkinCompileOnly 'org.slf4j:slf4j-api:2.0.0'
gherkinCompileOnly 'org.slf4j:slf4j-api:2.0.16'
// googleJavaFormat
googleJavaFormatCompileOnly 'com.google.googlejavaformat:google-java-format:1.22.0'
googleJavaFormatCompileOnly 'com.google.googlejavaformat:google-java-format:1.23.0'
// gson
gsonCompileOnly 'com.google.code.gson:gson:2.11.0'
// jackson
String VER_JACKSON='2.17.1'
String VER_JACKSON='2.17.2'
jacksonCompileOnly "com.fasterxml.jackson.core:jackson-databind:$VER_JACKSON"
jacksonCompileOnly "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$VER_JACKSON"
// ktfmt
Expand All @@ -114,22 +114,22 @@ dependencies {
// ktlint previous supported version
compatKtLint0Dot49Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-rule-engine:0.49.0'
compatKtLint0Dot49Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.49.0'
compatKtLint0Dot49Dot0CompileAndTestOnly 'org.slf4j:slf4j-api:2.0.0'
compatKtLint0Dot49Dot0CompileAndTestOnly 'org.slf4j:slf4j-api:2.0.16'
// ktlint previous supported version
compatKtLint0Dot50Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-rule-engine:0.50.0'
compatKtLint0Dot50Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:0.50.0'
compatKtLint0Dot50Dot0CompileAndTestOnly 'org.slf4j:slf4j-api:2.0.0'
compatKtLint0Dot50Dot0CompileAndTestOnly 'org.slf4j:slf4j-api:2.0.16'
// ktlint latest supported version
compatKtLint1Dot0Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-rule-engine:1.0.0'
compatKtLint1Dot0Dot0CompileAndTestOnly 'com.pinterest.ktlint:ktlint-ruleset-standard:1.0.0'
compatKtLint1Dot0Dot0CompileAndTestOnly 'org.slf4j:slf4j-api:2.0.0'
compatKtLint1Dot0Dot0CompileAndTestOnly 'org.slf4j:slf4j-api:2.0.16'
// palantirJavaFormat
palantirJavaFormatCompileOnly 'com.palantir.javaformat:palantir-java-format:1.1.0' // this version needs to stay compilable against Java 8 for CI Job testNpm
// scalafmt
scalafmtCompileOnly "org.scalameta:scalafmt-core_2.13:3.8.1"
// sortPom
sortPomCompileOnly 'com.github.ekryd.sortpom:sortpom-sorter:4.0.0'
sortPomCompileOnly 'org.slf4j:slf4j-api:2.0.12'
sortPomCompileOnly 'org.slf4j:slf4j-api:2.0.16'
// zjsonPatch
zjsonPatchCompileOnly 'com.flipkart.zjsonpatch:zjsonpatch:0.4.16'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final class CleanthatJavaStep implements Serializable {
/**
* CleanThat changelog is available at <a href="https://github.com/solven-eu/cleanthat/blob/master/CHANGES.MD">here</a>.
*/
private static final Jvm.Support<String> JVM_SUPPORT = Jvm.<String> support(NAME).add(11, "2.20");
private static final Jvm.Support<String> JVM_SUPPORT = Jvm.<String> support(NAME).add(11, "2.21");

private final JarState.Promised jarState;
private final String version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private static FormatterStep createInternally(String groupArtifact, String versi
.addMin(11, "1.8") // we only support google-java-format >= 1.8 due to api changes
.addMin(16, "1.10.0") // java 16 requires at least 1.10.0 due to jdk api changes in JavaTokenizer
.addMin(21, "1.17.0") // java 21 requires at least 1.17.0 due to https://github.com/google/google-java-format/issues/898
.add(11, "1.22.0"); // default version
.add(11, "1.23.0"); // default version

public static String defaultGroupArtifact() {
return MAVEN_COORDINATE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
public class JacksonJsonStep implements Serializable {
private static final long serialVersionUID = 1L;
private static final String MAVEN_COORDINATE = "com.fasterxml.jackson.core:jackson-databind:";
private static final String DEFAULT_VERSION = "2.17.1";
private static final String DEFAULT_VERSION = "2.17.2";
public static final String NAME = "jacksonJson";

private final JarState.Promised jarState;
Expand Down
3 changes: 3 additions & 0 deletions plugin-gradle/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `greclipse` version to latest `4.29` -> `4.32`. ([#2179](https://github.com/diffplug/spotless/pull/2179), [#2190](https://github.com/diffplug/spotless/pull/2190))
* Bump default `cdt` version to latest `11.3` -> `11.6`. ([#2179](https://github.com/diffplug/spotless/pull/2179))
* Bump default `gson` version to latest `2.10.1` -> `2.11.0`. ([#2128](https://github.com/diffplug/spotless/pull/2128))
* Bump default `cleanthat` version to latest `2.20` -> `2.21`. ([#2210](https://github.com/diffplug/spotless/pull/2210))
* Bump default `google-java-format` version to latest `1.22.0` -> `1.23.0`. ([#2212](https://github.com/diffplug/spotless/pull/2212))
### Fixed
* Fix compatibility issue introduced by `ktfmt` `0.51`. ([#2172](https://github.com/diffplug/spotless/issues/2172))
### Added
Expand Down Expand Up @@ -44,6 +46,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `shfmt` version to latest `3.7.0` -> `3.8.0`. ([#2050](https://github.com/diffplug/spotless/pull/2050))
* Bump default `sortpom` version to latest `3.2.1` -> `4.0.0`. ([#2049](https://github.com/diffplug/spotless/pull/2049), [#2078](https://github.com/diffplug/spotless/pull/2078), [#2115](https://github.com/diffplug/spotless/pull/2115))
* Bump default `zjsonpatch` version to latest `0.4.14` -> `0.4.16`. ([#1969](https://github.com/diffplug/spotless/pull/1969))
* Bump default `jackson` version to latest `2.17.1` -> `2.17.2`. ([#2195](https://github.com/diffplug/spotless/pull/2195))
### Removed
* **BREAKING** Fully removed `Rome`, use `Biome` instead. ([#2119](https://github.com/diffplug/spotless/pull/2119))

Expand Down
2 changes: 1 addition & 1 deletion plugin-gradle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies {
testImplementation "org.junit.jupiter:junit-jupiter:${VER_JUNIT}"
testImplementation "org.assertj:assertj-core:${VER_ASSERTJ}"
testImplementation "com.diffplug.durian:durian-testlib:${VER_DURIAN}"
testImplementation 'org.owasp.encoder:encoder:1.2.3'
testImplementation 'org.owasp.encoder:encoder:1.3.1'
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2023 DiffPlug
* Copyright 2016-2024 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 @@ -17,6 +17,7 @@

import java.io.IOException;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import com.diffplug.spotless.npm.EslintFormatterStep;
Expand Down Expand Up @@ -169,6 +170,7 @@ void useEslint() throws IOException {
}

@Test
@Disabled
void useEslintXoStandardRules() throws IOException {
setFile(".eslintrc.js").toResource("npm/eslint/typescript/styleguide/xo/.eslintrc.js");
setFile("tsconfig.json").toResource("npm/eslint/typescript/styleguide/xo/tsconfig.json");
Expand Down
3 changes: 3 additions & 0 deletions plugin-maven/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `greclipse` version to latest `4.29` -> `4.32`. ([#2179](https://github.com/diffplug/spotless/pull/2179), [#2190](https://github.com/diffplug/spotless/pull/2190))
* Bump default `cdt` version to latest `11.3` -> `11.6`. ([#2179](https://github.com/diffplug/spotless/pull/2179))
* Bump default `gson` version to latest `2.10.1` -> `2.11.0`. ([#2128](https://github.com/diffplug/spotless/pull/2128))
* Bump default `jackson` version to latest `2.17.1` -> `2.17.2`. ([#2195](https://github.com/diffplug/spotless/pull/2195))
* Bump default `cleanthat` version to latest `2.20` -> `2.21`. ([#2210](https://github.com/diffplug/spotless/pull/2210))
* Bump default `google-java-format` version to latest `1.22.0` -> `1.23.0`. ([#2212](https://github.com/diffplug/spotless/pull/2212))
### Fixed
* Fix compatibility issue introduced by `ktfmt` `0.51`. ([#2172](https://github.com/diffplug/spotless/issues/2172))
### Added
Expand Down
4 changes: 2 additions & 2 deletions plugin-maven/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ dependencies {
testImplementation "org.assertj:assertj-core:${VER_ASSERTJ}"
testImplementation "org.mockito:mockito-core:${VER_MOCKITO}"
testImplementation "com.diffplug.durian:durian-io:${VER_DURIAN}"
testImplementation 'com.github.spullara.mustache.java:compiler:0.9.13'
testImplementation 'org.owasp.encoder:encoder:1.2.3'
testImplementation 'com.github.spullara.mustache.java:compiler:0.9.14'
testImplementation 'org.owasp.encoder:encoder:1.3.1'
testImplementation "org.apache.maven:maven-plugin-api:${VER_MAVEN_API}"
testImplementation "org.eclipse.aether:aether-api:${VER_ECLIPSE_AETHER}"
testImplementation "org.codehaus.plexus:plexus-resources:${VER_PLEXUS_RESOURCES}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2023 DiffPlug
* Copyright 2016-2024 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 @@ -19,6 +19,7 @@

import java.io.IOException;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import com.diffplug.spotless.ProcessRunner;
Expand Down Expand Up @@ -210,6 +211,7 @@ void eslintStyleguideStandardWithTypescript() throws Exception {
}

@Test
@Disabled
void eslintStyleguideXo() throws Exception {
writePomWithTypescriptSteps(
TEST_FILE_PATH,
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ plugins {
// https://github.com/gradle-nexus/publish-plugin/releases
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0' apply false
// https://github.com/spotbugs/spotbugs-gradle-plugin/releases
id 'com.github.spotbugs' version '6.0.18' apply false
id 'com.github.spotbugs' version '6.0.20' apply false
// https://github.com/diffplug/spotless-changelog/blob/main/CHANGELOG.md
id 'com.diffplug.spotless-changelog' version '3.1.2' apply false
// https://github.com/radarsh/gradle-test-logger-plugin/blob/develop/CHANGELOG.md
id 'com.adarshr.test-logger' version '4.0.0' apply false
// https://github.com/davidburstrom/version-compatibility-gradle-plugin/tags
id 'io.github.davidburstrom.version-compatibility' version '0.5.0' apply false
// https://plugins.gradle.org/plugin/com.gradle.develocity
id 'com.gradle.develocity' version '3.17.5'
id 'com.gradle.develocity' version '3.17.6'
// https://github.com/equodev/equo-ide/blob/main/plugin-gradle/CHANGELOG.md
id 'dev.equo.ide' version '1.7.6' apply false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ class EslintJavascriptFormattingStepTest extends NpmFormatterStepCommonTests {
"custom_rules", EslintFormatterStep.defaultDevDependenciesForTypescript(),
"styleguide/airbnb", EslintStyleGuide.JS_AIRBNB.mergedWith(EslintFormatterStep.defaultDevDependencies()),
"styleguide/google", EslintStyleGuide.JS_GOOGLE.mergedWith(EslintFormatterStep.defaultDevDependencies()),
"styleguide/standard", EslintStyleGuide.JS_STANDARD.mergedWith(EslintFormatterStep.defaultDevDependencies()),
"styleguide/xo", EslintStyleGuide.JS_XO.mergedWith(EslintFormatterStep.defaultDevDependencies()));
"styleguide/standard", EslintStyleGuide.JS_STANDARD.mergedWith(EslintFormatterStep.defaultDevDependencies()));

@ParameterizedTest(name = "{index}: eslint can be applied using ruleset {0}")
@ValueSource(strings = {"custom_rules", "styleguide/airbnb", "styleguide/google", "styleguide/standard", "styleguide/xo"})
@ValueSource(strings = {"custom_rules", "styleguide/airbnb", "styleguide/google", "styleguide/standard"})
void formattingUsingRulesetsFile(String ruleSetName) throws Exception {
String filedir = "npm/eslint/javascript/" + ruleSetName + "/";

Expand Down Expand Up @@ -79,11 +78,10 @@ class EslintTypescriptFormattingStepTest extends NpmFormatterStepCommonTests {

private final Map<String, Map<String, String>> devDependenciesForRuleset = ImmutableMap.of(
"custom_rules", EslintFormatterStep.defaultDevDependenciesForTypescript(),
"styleguide/standard_with_typescript", EslintStyleGuide.TS_STANDARD_WITH_TYPESCRIPT.mergedWith(EslintFormatterStep.defaultDevDependenciesForTypescript()),
"styleguide/xo", EslintStyleGuide.TS_XO_TYPESCRIPT.mergedWith(EslintFormatterStep.defaultDevDependenciesForTypescript()));
"styleguide/standard_with_typescript", EslintStyleGuide.TS_STANDARD_WITH_TYPESCRIPT.mergedWith(EslintFormatterStep.defaultDevDependenciesForTypescript()));

@ParameterizedTest(name = "{index}: eslint can be applied using ruleset {0}")
@ValueSource(strings = {"custom_rules", "styleguide/standard_with_typescript", "styleguide/xo"})
@ValueSource(strings = {"custom_rules", "styleguide/standard_with_typescript"})
void formattingUsingRulesetsFile(String ruleSetName) throws Exception {
String filedir = "npm/eslint/typescript/" + ruleSetName + "/";

Expand Down

0 comments on commit b008644

Please sign in to comment.