Skip to content

Commit

Permalink
Merge branch 'main' into feat/dont-break-config-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Sep 3, 2021
2 parents fa01f46 + 169f9b5 commit 62794d4
Show file tree
Hide file tree
Showing 192 changed files with 5,374 additions and 658 deletions.
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,27 +283,35 @@ workflows:
- do_release_all:
requires:
- release_all
context:
- SonatypeDeploy
- release_plugin_gradle:
type: approval
requires:
- changelog_print
- do_release_plugin_gradle:
requires:
- release_plugin_gradle
context:
- SonatypeDeploy
- release_plugin_maven:
type: approval
requires:
- changelog_print
- do_release_plugin_maven:
requires:
- release_plugin_maven
context:
- SonatypeDeploy
- release_lib:
type: approval
requires:
- changelog_print
- do_release_lib:
requires:
- release_lib
context:
- SonatypeDeploy
ext_deploy:
jobs:
- ext_changelog_print:
Expand All @@ -317,13 +325,17 @@ workflows:
- ext_do_release_base:
requires:
- ext_release_base
context:
- SonatypeDeploy
- ext_release_jdt:
type: approval
requires:
- ext_changelog_print
- ext_do_release_jdt:
requires:
- ext_release_jdt
context:
- SonatypeDeploy
- ext_release_cdt:
type: approval
requires:
Expand All @@ -334,6 +346,8 @@ workflows:
only: main
requires:
- ext_release_cdt
context:
- SonatypeDeploy
- ext_release_groovy:
type: approval
requires:
Expand All @@ -344,6 +358,8 @@ workflows:
only: main
requires:
- ext_release_groovy
context:
- SonatypeDeploy
- ext_release_wtp:
type: approval
requires:
Expand All @@ -354,3 +370,5 @@ workflows:
only: main
requires:
- ext_release_wtp
context:
- SonatypeDeploy
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
107 changes: 107 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,113 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (

## [Unreleased]

## [2.15.3] - 2021-08-20
### Changed
* Added support for [scalafmt 3.0.0](https://github.com/scalameta/scalafmt/releases/tag/v3.0.0) and bump default scalafmt version to `3.0.0` ([#913](https://github.com/diffplug/spotless/pull/913)).
* Bump default versions ([#915](https://github.com/diffplug/spotless/pull/915))
* `ktfmt` from `0.24` to `0.27`
* `ktlint` from `0.35.0` to `0.42.1`
* `google-java-format` from `1.10.0` to `1.11.0`
* Fix javadoc publishing ([#916](https://github.com/diffplug/spotless/pull/916) fixes [#775](https://github.com/diffplug/spotless/issues/775)).

## [2.15.2] - 2021-07-20
### Fixed
* Improved [SQL formatting](https://github.com/diffplug/spotless/pull/897) with respect to comments

## [2.15.1] - 2021-07-06
### Changed
* Improved exception messages for [JSON formatting](https://github.com/diffplug/spotless/pull/885) failures

## [2.15.0] - 2021-06-17

### Added
* Added formatter for [JVM-based JSON formatting](https://github.com/diffplug/spotless/issues/850)
* Added Gradle configuration JVM-based JSON formatting

## [2.14.0] - 2021-06-10
### Added
* Added support for `eclipse-cdt` at `4.19.0`. Note that version requires Java 11 or higher.
* Added support for `eclipse-groovy` at `4.18.0` and `4.19.0`.
* Added support for `eclipse-wtp` at `4.19.0`. Note that version requires Java 11 or higher.
### Changed
* Bump `eclipse-groovy` default version from `4.17.0` to `4.19.0`.

## [2.13.5] - 2021-05-13
### Changed
* Update ktfmt from 0.21 to 0.24
### Fixed
* The `<url>` field in the maven POM is now set correctly ([#798](https://github.com/diffplug/spotless/issues/798))
* Node is re-installed if some other build step removed it ([#863](https://github.com/diffplug/spotless/issues/863))

## [2.13.4] - 2021-04-21
### Fixed
* Explicitly separate target file from git arguments when parsing year for license header to prevent command from failing on argument-like paths ([#847](https://github.com/diffplug/spotless/pull/847))

## [2.13.3] - 2021-04-20
### Fixed
* LicenseHeaderStep treats address as copyright year ([#716](https://github.com/diffplug/spotless/issues/716))

## [2.13.2] - 2021-04-12
### Fixed
* Fix license header bug for years in range ([#840](https://github.com/diffplug/spotless/pull/840)).

## [2.13.1] - 2021-04-10
### Changed
* Update default google-java-format from 1.9 to 1.10.0
* Expose configuration exceptions from scalafmt ([#837](https://github.com/diffplug/spotless/issues/837))

## [2.13.0] - 2021-03-05
### Added
* Bump ktfmt to 0.21 and add support to Google and Kotlinlang formats ([#812](https://github.com/diffplug/spotless/pull/812))

## [2.12.1] - 2021-02-16
### Fixed
* Allow licence headers to be blank ([#801](https://github.com/diffplug/spotless/pull/801)).

## [2.12.0] - 2021-02-09
### Added
* Support for diktat ([#789](https://github.com/diffplug/spotless/pull/789))

## [2.11.0] - 2021-01-04
### Added
* Added support for `eclipse-cdt`, `eclipse-jdt`, and `eclipse-wtp` at `4.18.0`.
### Changed
* Bump `eclipse-jdt` default version from `4.17.0` to `4.18.0`.
* Bump `eclipse-wtp` default version from `4.17.0` to `4.18.0`.
* Bump `ktfmt` default version from `0.16` to `0.19` ([#748](https://github.com/diffplug/spotless/issues/748) and [#773](https://github.com/diffplug/spotless/issues/773)).
* Bump `jgit` from `5.9` to `5.10` ([#773](https://github.com/diffplug/spotless/issues/773)).
### Fixed
* Fixed `ratchetFrom` support for git-submodule ([#746](https://github.com/diffplug/spotless/issues/746)).
* Fixed `ratchetFrom` excess memory consumption ([#735](https://github.com/diffplug/spotless/issues/735)).
* `ktfmt` v0.19+ with dropbox-style works again ([#765](https://github.com/diffplug/spotless/pull/765)).
* `prettier` no longer throws errors on empty files ([#751](https://github.com/diffplug/spotless/pull/751)).
* Fixed error when running on root of windows mountpoint ([#760](https://github.com/diffplug/spotless/pull/760)).
* Fixed typo in javadoc comment for SQL\_FORMATTER\_INDENT\_TYPE ([#753](https://github.com/diffplug/spotless/pull/753)).

## [2.10.2] - 2020-11-16
### Fixed
* Fixed a bug which occurred if the root directory of the project was also the filesystem root ([#732](https://github.com/diffplug/spotless/pull/732))

## [2.10.1] - 2020-11-13
### Fixed
* Bump JGit from `5.8.0` to `5.9.0` to improve performance ([#726](https://github.com/diffplug/spotless/issues/726))

## [2.10.0] - 2020-11-02
### Added
* Added support to npm-based steps for picking up `.npmrc` files ([#727](https://github.com/diffplug/spotless/pull/727))

## [2.9.0] - 2020-10-20
### Added
* Added support for eclipse-cdt 4.14.0, 4.16.0 and 4.17.0 ([#722](https://github.com/diffplug/spotless/pull/722)).
* Added support for eclipse-groovy 4.14.0, 4.15.0, 4.16.0 and 4.17.0 ([#722](https://github.com/diffplug/spotless/pull/722)).
* Added support for eclipse-jdt 4.17.0 ([#722](https://github.com/diffplug/spotless/pull/722)).
* Added support for eclipse-wtp 4.14.0, 4.15.0, 4.16.0 and 4.17.0 ([#722](https://github.com/diffplug/spotless/pull/722)).
### Changed
* Updated default eclipse-cdt from 4.13.0 to 4.16.0 ([#722](https://github.com/diffplug/spotless/pull/722)). Note that version 4.17.0 is supported, but requires Java 11 or higher.
* Updated default eclipse-groovy from 4.13.0 to 4.17.0 ([#722](https://github.com/diffplug/spotless/pull/722)).
* Updated default eclipse-jdt from 4.16.0 to 4.17.0 ([#722](https://github.com/diffplug/spotless/pull/722)).
* Updated default eclipse-wtp from 4.13.0 to 4.17.0 ([#722](https://github.com/diffplug/spotless/pull/722)).

## [2.8.0] - 2020-10-05
### Added
* Exposed new methods in `GitRatchet` to support faster ratcheting in the maven plugin ([#706](https://github.com/diffplug/spotless/pull/706)).
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ lib('java.RemoveUnusedImportsStep') +'{{yes}} | {{yes}}
extra('java.EclipseJdtFormatterStep') +'{{yes}} | {{yes}} | {{yes}} | {{no}} |',
lib('kotlin.KtLintStep') +'{{yes}} | {{yes}} | {{yes}} | {{no}} |',
lib('kotlin.KtfmtStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
lib('kotlin.DiktatStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
lib('markdown.FreshMarkStep') +'{{yes}} | {{no}} | {{no}} | {{no}} |',
lib('npm.PrettierFormatterStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
lib('npm.TsFmtFormatterStep') +'{{yes}} | {{yes}} | {{no}} | {{no}} |',
Expand Down Expand Up @@ -95,6 +96,7 @@ extra('wtp.EclipseWtpFormatterStep') +'{{yes}} | {{yes}}
| [`java.EclipseJdtFormatterStep`](lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStep.java) | :+1: | :+1: | :+1: | :white_large_square: |
| [`kotlin.KtLintStep`](lib/src/main/java/com/diffplug/spotless/kotlin/KtLintStep.java) | :+1: | :+1: | :+1: | :white_large_square: |
| [`kotlin.KtfmtStep`](lib/src/main/java/com/diffplug/spotless/kotlin/KtfmtStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
| [`kotlin.DiktatStep`](lib/src/main/java/com/diffplug/spotless/kotlin/DiktatStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
| [`markdown.FreshMarkStep`](lib/src/main/java/com/diffplug/spotless/markdown/FreshMarkStep.java) | :+1: | :white_large_square: | :white_large_square: | :white_large_square: |
| [`npm.PrettierFormatterStep`](lib/src/main/java/com/diffplug/spotless/npm/PrettierFormatterStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
| [`npm.TsFmtFormatterStep`](lib/src/main/java/com/diffplug/spotless/npm/TsFmtFormatterStep.java) | :+1: | :+1: | :white_large_square: | :white_large_square: |
Expand Down Expand Up @@ -126,7 +128,7 @@ Once someone has filled in one square of the formatter/build system matrix, it's
- Thanks to [Matthias Andreas Benkard](https://github.com/benkard) for adding support for google-java-format 1.8+ ([#563](https://github.com/diffplug/spotless/pull/563))
- Thanks to [Ranadeep Polavarapu](https://github.com/RanadeepPolavarapu) for adding support for ktfmt ([#569](https://github.com/diffplug/spotless/pull/569))
- Thanks to [Simon Gamma](https://github.com/simschla) for [adding support for npm-based formatters](https://github.com/diffplug/spotless/pull/283), [twice](https://github.com/diffplug/spotless/pull/606) including `prettier` and `tsfmt`.
- Thanks to [Kevin Brooks](https://github.com/k-brooks) for [updating all eclipse-based formatters to 4.13](https://github.com/diffplug/spotless/pull/482).
- Thanks to [Kevin Brooks](https://github.com/k-brooks) for [updating all eclipse-based formatters to 4.13](https://github.com/diffplug/spotless/pull/482) and [fixing Groovy for multiproject](https://github.com/diffplug/spotless/issues/877).
- Thanks to [Thomas Glaeser](https://github.com/tglaeser) for [finding](https://github.com/diffplug/spotless/issues/654) and [fixing](https://github.com/diffplug/spotless/pull/656) a file-permissions-clobbering bug.
- Thanks to [Joan Goyeau](https://github.com/joan38) for [fixing scalafmt integration](https://github.com/diffplug/spotless/pull/260).
- Thanks to [Nick Sutcliffe](https://github.com/nsutcliffe) for [fixing scalafmt post-2.0](https://github.com/diffplug/spotless/pull/416).
Expand All @@ -151,6 +153,7 @@ Once someone has filled in one square of the formatter/build system matrix, it's
- Thanks to [Oliver Szymanski](https://github.com/source-knights) for porting [tsfmt](https://github.com/diffplug/spotless/pull/553) and [prettier](https://github.com/diffplug/spotless/pull/555) to maven.
- Thanks to Andrew Oberstar for improvements to formatting java source in non-java source sets. [PR #60](https://github.com/diffplug/spotless/pull/60).
- Thanks to [Sameer Balasubrahmanyam](https://github.com/sameer-b) for [adding support for IntelliJ-style year placeholders](https://github.com/diffplug/spotless/pull/542).
- Thanks to [Jamie Tanna](https://github.com/jamietanna) for [adding a simple JSON formatter](https://github.com/diffplug/spotless/pull/853).
- Thanks to [Adib Saikali](https://github.com/asaikali) and [Paul Merlin](https://github.com/eskatos) for tracking down the tricky cause of [#506](https://github.com/diffplug/spotless/issues/506).
- Import ordering from [EclipseCodeFormatter](https://github.com/krasa/EclipseCodeFormatter).
- Built by [gradle](https://gradle.org/).
Expand Down
4 changes: 3 additions & 1 deletion RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Release checklist
# Manual Release checklist

We now do this automatically in CI.

- [ ] Revise [`CHANGES.md`](CHANGES.md), [`plugin-gradle/CHANGES.md`](plugin-gradle/CHANGES.md), and [`plugin-maven/CHANGES.md`](plugin-maven/CHANGES.md)
- [ ] If necessary, release lib `./gradlew :changelogPush`
Expand Down
9 changes: 9 additions & 0 deletions _ext/eclipse-base/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (

## [Unreleased]

## [3.5.0] - 2021-06-20
### Added
* Support of `org.eclipse.core.resources` version `3.15.0` required by Eclipse `4.20`.
* Minimum required Java version changed from 8 to 11.

## [3.4.2] - 2020-12-26
### Fixed
* `org.eclipse.osgi` version `3.16.100` does not allow `null` as Debug service for `CloseableBundleFile`.

## [3.4.1] - 2020-09-24
### Fixed
* Restored scope of transitive dependencies to 'compile'.
Expand Down
1 change: 0 additions & 1 deletion _ext/eclipse-base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dependencies {
api("org.eclipse.platform:org.eclipse.core.resources:${VER_ECLIPSE_CORE_RESOURCES}") {
exclude group: 'org.eclipse.platform', module: 'org.eclipse.ant.core'
exclude group: 'org.eclipse.platform', module: 'org.eclipse.core.expressions'
exclude group: 'org.eclipse.platform', module: 'org.eclipse.core.filesystem'
}
api("org.slf4j:slf4j-api:${VER_SLF4J}")

Expand Down
5 changes: 4 additions & 1 deletion _ext/eclipse-base/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
artifactId=spotless-eclipse-base
description=Eclipse bundle controller and services for Spotless

# Build requirements
VER_JAVA=11

# Compile dependencies
VER_ECLIPSE_CORE_RESOURCES=[3.13.800,4.0.0[
VER_ECLIPSE_CORE_RESOURCES=[3.15.0,4.0.0[
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 DiffPlug
* Copyright 2016-2021 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 @@ -24,6 +24,7 @@
import java.util.jar.JarFile;
import java.util.jar.Manifest;

import org.eclipse.osgi.internal.debug.Debug;
import org.eclipse.osgi.storage.bundlefile.BundleEntry;
import org.eclipse.osgi.storage.bundlefile.BundleFile;
import org.eclipse.osgi.storage.bundlefile.DirBundleFile;
Expand All @@ -32,6 +33,8 @@
import org.osgi.framework.BundleException;
import org.osgi.framework.Constants;

import com.diffplug.spotless.extra.eclipse.base.service.NoDebugging;

/**
* Helper to access resources.
* <p>
Expand All @@ -48,8 +51,7 @@
* </p>
*/
class ResourceAccessor {
/**
*/
private static final Debug NO_DEBUGGING = new Debug(new NoDebugging());
private final String fatJarResourcePath;
private final BundleFile bundleFile;

Expand Down Expand Up @@ -77,7 +79,7 @@ private static BundleFile getBundlFile(Class<?> clazz) throws BundleException {
throw new BundleException(String.format("Path '%s' for '%s' is not accessible exist on local file system.", objUri, clazz.getName()), BundleException.READ_ERROR);
}
try {
return jarOrDirectory.isDirectory() ? new DirBundleFile(jarOrDirectory, false) : new ZipBundleFile(jarOrDirectory, null, null, null);
return jarOrDirectory.isDirectory() ? new DirBundleFile(jarOrDirectory, false) : new ZipBundleFile(jarOrDirectory, null, null, NO_DEBUGGING, false);
} catch (IOException e) {
throw new BundleException(String.format("Cannot access bundle at '%s'.", jarOrDirectory), BundleException.READ_ERROR, e);
}
Expand Down
22 changes: 18 additions & 4 deletions _ext/eclipse-cdt/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,30 @@
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `9.9.0`).

## [Unreleased]
### Changed

## [10.3.0] - 2021-06-27
### Added
* Switch to Eclipse CDT release 10.3 for Eclipse 4.20.

## [10.2.0] - 2021-06-07
### Added
* Switch to Eclipse CDT release 10.2 for Eclipse 4.19.

## [10.1.0] - 2020-12-26
### Added
* Switch to Eclipse CDT release 10.1 for Eclipse 4.18.

## [10.0.0] - 2020-10-17
### Added
* Switch to Eclipse CDT release 10.0 for Eclipse 4.17.
* Minimum required Java version changed from 8 to 11.
* **BREAKING** Minimum required Java version changed from 8 to 11.

## [9.11.0] - 2020-10-03
### Changed
### Added
* Switch to Eclipse CDT release 9.11.1 for Eclipse 4.16.

## [9.10.0] - 2020-09-25
### Changed
### Added
* Switch to Eclipse CDT release 9.10 for Eclipse 4.14.

## [9.9.0] - 2019-11-01
Expand Down
10 changes: 5 additions & 5 deletions _ext/eclipse-cdt/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description=Eclipse's CDT C/C++ formatter bundled for Spotless
VER_JAVA=11

# Compile dependencies
VER_ECLIPSE_CDT=10.0
VER_SPOTLESS_ECLISPE_BASE=[3.3.0,4.0.0[
VER_ECLISPE_JFACE=[3.15.300,4.0.0[
VER_ECLISPE_EFS=[3.6.700,4.0.0[
VER_IBM_ICU=[61,65[
VER_ECLIPSE_CDT=10.3
VER_SPOTLESS_ECLISPE_BASE=[3.5.0,4.0.0[
VER_ECLISPE_JFACE=[3.18.0,4.0.0[
VER_ECLISPE_EFS=[3.7.0,4.0.0[
VER_IBM_ICU=[67.1,68[
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 DiffPlug
* Copyright 2016-2020 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 @@ -23,7 +23,6 @@

import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.formatter.CodeFormatter;
import org.eclipse.core.internal.filebuffers.FileBuffersPlugin;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.text.edits.TextEdit;
Expand Down Expand Up @@ -56,7 +55,6 @@ public void registerServices(SpotlessEclipseServiceConfig config) {
@Override
public void activatePlugins(SpotlessEclipsePluginConfig config) {
config.applyDefault();
config.add(new FileBuffersPlugin());
config.add(new CCorePlugin());
}
}
Expand Down
Loading

0 comments on commit 62794d4

Please sign in to comment.