diff --git a/CHANGES.md b/CHANGES.md index c44dfd9050..580a3b0d76 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,11 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( * You can now put the filename into a license header template with `$FILE`. ([#1605](https://github.com/diffplug/spotless/pull/1605) fixes [#1147](https://github.com/diffplug/spotless/issues/1147)) ### Changes * We are now opting in to Gradle's new stable configuration cache. ([#1591](https://github.com/diffplug/spotless/pull/1591)) +* Adopt [Equo Solstice OSGi and p2 shim](https://github.com/equodev/equo-ide/tree/main/solstice) to update all Eclipse-based plugins. ([#1524](https://github.com/diffplug/spotless/pull/1524)) + * Eclipse JDT now supports `4.9` through `4.26`. Also we now recommend dropping the last `.0`, e.g. `4.26` instead of `4.26.0`, you'll get warnings to help you switch. + * Eclipse Groovy now supports `4.18` through `4.26`. Also we now recommend dropping the last `.0`, e.g. `4.26` instead of `4.26.0`, you'll get warnings to help you switch. + * Eclipse CDT now supports `10.6` through `11.0`. + * Eclipse WTP is still WIP at [#1622](https://github.com/diffplug/spotless/pull/1622). ## [2.36.0] - 2023-02-27 ### Added diff --git a/_ext/eclipse-cdt/CHANGES.md b/_ext/eclipse-cdt/CHANGES.md deleted file mode 100644 index cda212bd3d..0000000000 --- a/_ext/eclipse-cdt/CHANGES.md +++ /dev/null @@ -1,63 +0,0 @@ -# spotless-eclipse-cdt - -We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `9.9.0`). - -## [Unreleased] -### Fixed -* Fix typo in gradle variable names ([#1425](https://github.com/diffplug/spotless/pull/1425)) - -## [10.5.0] - 2021-12-13 -### Added -* Switch to Eclipse CDT release 10.5 for Eclipse 2021-12. - -## [10.4.0] - 2021-09-23 -### Added -* Switch to Eclipse CDT release 10.4 for Eclipse 4.21. - -## [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. -* **BREAKING** Minimum required Java version changed from 8 to 11. - -## [9.11.0] - 2020-10-03 -### Added -* Switch to Eclipse CDT release 9.11.1 for Eclipse 4.16. - -## [9.10.0] - 2020-09-25 -### Added -* Switch to Eclipse CDT release 9.10 for Eclipse 4.14. - -## [9.9.0] - 2019-11-01 -* Switch to Eclipse CDT release 9.9 for Eclipse 4.13 ([#480](https://github.com/diffplug/spotless/issues/480)). - -## [9.8.1] - 2019-10-31 -* Really publish Eclipse CDT release 9.8 for Eclipse 4.12 ([#482](https://github.com/diffplug/spotless/pull/482)). - -## [9.8.0] - 2019-07-24 -* **Known bug** - we actually published Eclipse CDT 9.7 instead of 9.8 - fixed in 9.8.1 -* Switch to Eclipse CDT release 9.8 for Eclipse 4.12 ([#423](https://github.com/diffplug/spotless/pull/423)). - -## [9.7.0] - 2019-03-31 -* Switch to Eclipse CDT release 9.7 for Eclipse 4.11 ([#389](https://github.com/diffplug/spotless/pull/389)). -* Include Eclipse logging allowing formatter warnings/errors to be logged via SLF4J ([#236](https://github.com/diffplug/spotless/issues/236)). - -## [9.4.5] - 2019-02-25 -* Replaced `http` update-site with `https` ([#360](https://github.com/diffplug/spotless/issues/360)). - -## [9.4.4] - 2018-09-04 -* Added missing log service, which caused exceptions on AST warnings ([#286](https://github.com/diffplug/spotless/pull/286)). - -## [9.4.3] - 2018-08-08 -* Initial release! diff --git a/_ext/eclipse-cdt/LICENSE.txt b/_ext/eclipse-cdt/LICENSE.txt deleted file mode 100644 index 3d967aee74..0000000000 --- a/_ext/eclipse-cdt/LICENSE.txt +++ /dev/null @@ -1,70 +0,0 @@ -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: -i) changes to the Program, and -ii) additions to the Program; -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and -b) its license agreement: -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and -b) a copy of this Agreement must be included with each copy of the Program. -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/_ext/eclipse-cdt/README.md b/_ext/eclipse-cdt/README.md deleted file mode 100644 index 842fbad606..0000000000 --- a/_ext/eclipse-cdt/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# spotless-eclipse-cdt - -Eclipse CDT is not available in a form which can be easily consumed by maven or gradle. To fix this, we publish Eclipse's formatter and all its dependencies, along with a small amount of glue code, into the `com.diffplug.gradle.spotless:spotless-eclipse-cdt` artifact. - -To publish a new version, update the `_ext/eclipse-cdt/gradle.properties` appropriately and see [CONTRIBUTING.md](../../CONTRIBUTING.md) how to enable -`_ext` projects. - -## License - -Spotless at large is under the Apache 2.0 license, but this jar is under the EPL v1. diff --git a/_ext/eclipse-cdt/build.gradle b/_ext/eclipse-cdt/build.gradle deleted file mode 100644 index 0982b7d555..0000000000 --- a/_ext/eclipse-cdt/build.gradle +++ /dev/null @@ -1,40 +0,0 @@ -ext { - developers = [ - fvgh: [ name: 'Frank Vennemeyer', email: 'frankgh@zoho.com' ], - ] - - p2Repository = "https://download.eclipse.org/tools/cdt/releases/${VER_ECLIPSE_CDT}" - - p2Dependencies = [ - 'org.eclipse.cdt.core':'+', // CodeFormatter and related - ] - -} - -apply from: rootProject.file('_ext/gradle/update-lockfile.gradle') -apply from: rootProject.file('_ext/gradle/p2-fat-jar-setup.gradle') -apply from: rootProject.file('gradle/java-publish.gradle') - - -dependencies { - implementation "com.diffplug.spotless:spotless-eclipse-base:${VER_SPOTLESS_ECLIPSE_BASE}" - // Provides text partitioners for formatters - implementation ("org.eclipse.platform:org.eclipse.jface.text:${VER_ECLIPSE_JFACE}") { - exclude group: 'org.eclipse.platform', module: 'org.eclipse.swt' - } - // Required to by CCorePlugin calling CDTLogWriter - implementation "com.ibm.icu:icu4j:${VER_IBM_ICU}" - // Required to by CCorePlugin calling PositionTrackerManager - implementation "org.eclipse.platform:org.eclipse.core.filebuffers:${VER_ECLIPSE_EFS}" - - testImplementation("org.slf4j:slf4j-simple:${VER_SLF4J}") -} - - -////////// -// Test // -////////// -sourceSets { - // Use JAR file with all resources for Eclipse-CDT integration-tests - test.runtimeClasspath = jar.outputs.files + sourceSets.test.output + sourceSets.test.compileClasspath -} diff --git a/_ext/eclipse-cdt/gradle.properties b/_ext/eclipse-cdt/gradle.properties deleted file mode 100644 index 821ceea4d1..0000000000 --- a/_ext/eclipse-cdt/gradle.properties +++ /dev/null @@ -1,12 +0,0 @@ -artifactId=spotless-eclipse-cdt -description=Eclipse's CDT C/C++ formatter bundled for Spotless - -# Build requirements -VER_JAVA=11 - -# Compile dependencies -VER_ECLIPSE_CDT=10.5 -VER_SPOTLESS_ECLIPSE_BASE=[3.5.0,4.0.0[ -VER_ECLIPSE_JFACE=[3.18.0,4.0.0[ -VER_ECLIPSE_EFS=[3.7.0,4.0.0[ -VER_IBM_ICU=[67.1,68[ diff --git a/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/package-info.java b/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/package-info.java deleted file mode 100644 index 831ab2b427..0000000000 --- a/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2016 DiffPlug - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** Eclipse CDT based Spotless formatter */ -@ParametersAreNonnullByDefault -package com.diffplug.spotless.extra.eclipse.cdt; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/_ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java b/_ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java deleted file mode 100644 index 05637a4e22..0000000000 --- a/_ext/eclipse-cdt/src/test/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImplTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.diffplug.spotless.extra.eclipse.cdt; - -import static com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseFramework.LINE_DELIMITER; -import static org.junit.jupiter.api.Assertions.*; - -import java.util.Properties; -import java.util.function.Consumer; - -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants; -import org.junit.jupiter.api.Test; - -/** Eclipse CDT wrapper integration tests */ -class EclipseCdtFormatterStepImplTest { - - private final static String CPP_UNFORMATTED = "#include \n" + - "using namespace std;\n" + - "int main()\n{\n" + - " cout <<\n\"Hello, World!\";\n" + - " return 0;\n" + - "}".replaceAll("\n", LINE_DELIMITER); - private final static String CPP_FORMATTED = "#include \n" + - "using namespace std;\n" + - "int main() {\n" + - "\tcout << \"Hello, World!\";\n" + - "\treturn 0;\n" + - "}\n".replaceAll("\n", LINE_DELIMITER); - - private final static String DOXYGEN_HTML = "/**\n *
void f() {int a =1;} 
\n */\n".replaceAll("\n", LINE_DELIMITER); - - private final static String ILLEGAL_CHAR = Character.toString((char) 254); - - private final static String FUNCT_PTR_UNFORMATTED = "void (*getFunc(void)) (int);"; - private final static String FUNCT_PTR_FORMATTED = "void (* getFunc(void)) (int);"; - - @Test - void defaultFormat() throws Throwable { - String output = format(CPP_UNFORMATTED, config -> {}); - assertEquals(CPP_FORMATTED, - output, "Unexpected formatting with default preferences."); - } - - @Test - void invalidFormat() throws Throwable { - String output = format(CPP_FORMATTED.replace("int main() {", "int main() "), config -> {}); - assertTrue(output.contains("int main()" + LINE_DELIMITER), "Incomplete CPP not formatted on best effort basis."); - } - - @Test - void invalidCharater() throws Throwable { - String output = format(CPP_FORMATTED.replace("int main() {", "int main()" + ILLEGAL_CHAR + " {"), config -> {}); - assertTrue(output.contains("int main()" + LINE_DELIMITER), "Invalid charater not formatted on best effort basis."); - } - - @Test - void invalidConfiguration() throws Throwable { - String output = format(CPP_FORMATTED, config -> { - config.setProperty(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE); - config.setProperty(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "noInteger"); - }); - assertEquals(CPP_FORMATTED.replace("\t", " "), - output, "Invalid indentation configuration not replaced by default value (4 spaces)"); - } - - @Test - void htmlCommentFormat() throws Throwable { - String output = format(DOXYGEN_HTML + CPP_FORMATTED, config -> {}); - assertEquals(DOXYGEN_HTML + CPP_FORMATTED, - output, "HTML comments not ignored by formatter."); - } - - @Test - void regionWarning() throws Throwable { - String output = format(FUNCT_PTR_UNFORMATTED, config -> {}); - assertEquals(FUNCT_PTR_FORMATTED, output, "Code not formatted at all due to regional error."); - } - - private static String format(final String input, final Consumer config) throws Exception { - Properties properties = new Properties(); - config.accept(properties); - EclipseCdtFormatterStepImpl formatter = new EclipseCdtFormatterStepImpl(properties); - return formatter.format(input); - } -} diff --git a/_ext/eclipse-groovy/CHANGES.md b/_ext/eclipse-groovy/CHANGES.md deleted file mode 100644 index b0f909ccb2..0000000000 --- a/_ext/eclipse-groovy/CHANGES.md +++ /dev/null @@ -1,66 +0,0 @@ -# spotless-eclipse-groovy - -We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.5.0`). - -## [Unreleased] -### Fixed -* Fix typo in gradle variable names ([#1425](https://github.com/diffplug/spotless/pull/1425)) - -## [4.3.0] - 2021-10-13 -### Added -* Switch to Groovy-Eclipse release 4.3.0 for Eclipse 4.21 using Groovy 4.0.0 Beta 1. - -## [4.2.0] - 2021-09-14 -### Added -* Switch to Groovy-Eclipse release 4.2.0 for Eclipse 4.20 using Groovy 4.0.0 Alpha 3. - -### Fixed -* Fixed IndexOutOfBoundsException in parallel execution of `eclipse-groovy` formatter ([#877](https://github.com/diffplug/spotless/issues/877)) - -## [4.1.0] - 2021-06-05 -### Added -* Switch to Groovy-Eclipse release 4.1.0 for Eclipse 4.19 using Groovy 4.0.0 Alpha 2. - -## [4.0.0] - 2021-04-10 -### Added -* Switch to Groovy-Eclipse release 4.0.0 for Eclipse 4.18 using Groovy 4.0.0 Alpha 2. -* **BREAKING** Keep spotless-eclipse-groovy major version in sync with Groovy-Eclipse version. - -## [3.9.0] - 2020-10-17 -### Added -* Fixed version number determined by change log. - -## [3.8.1] - 2020-10-17 -### Added -* Switch to Groovy-Eclipse release 3.9.0 for Eclipse 4.17 using Groovy-Indy 3.0.6. - -## [3.8.0] - 2020-10-04 -### Added -* Switch to Groovy-Eclipse release 3.8.0 for Eclipse 4.16 using Groovy-Indy 3.0.4. - -## [3.7.0] - 2020-10-03 -### Added -* Switch to Groovy-Eclipse release 3.7.0 for Eclipse 4.15 using Groovy-Indy 3.0.2. - -## [3.6.0] - 2020-09-26 -### Added -* Switch to Groovy-Eclipse release 3.6.0 for Eclipse 4.14. - -## [3.5.0] - 2019-09-01 -* Switch to Groovy-Eclipse release 3.5.0 for Eclipse 4.13 ([#480](https://github.com/diffplug/spotless/issues/480)). - -## [3.4.0] - 2019-07-24 -* Switch to Groovy-Eclipse release 3.4.0 for Eclipse 4.12 using Groovy-Indy 3.0.0 ([#423](https://github.com/diffplug/spotless/pull/423)). - -## [3.2.0] - 2019-03-16 -* Switch to Groovy-Eclipse release 3.2.0 for Eclipse 4.10 ([#375](https://github.com/diffplug/spotless/pull/375)). -* Include Eclipse logging allowing formatter warnings/errors to be logged via SLF4J ([#236](https://github.com/diffplug/spotless/issues/236)). - -## [3.0.1] - 2019-02-25 -* Replaced `http` update-site with `https` ([#360](https://github.com/diffplug/spotless/issues/360)). - -## [3.0.0] - 2018-09-04 -* Switch to Groovy-Eclipse release 3.0.0 and Groovy 2.6 ([#288](https://github.com/diffplug/spotless/issues/288)). - -## [2.9.2] - 2018-07-19 -* Initial release! diff --git a/_ext/eclipse-groovy/LICENSE.txt b/_ext/eclipse-groovy/LICENSE.txt deleted file mode 100644 index 3d967aee74..0000000000 --- a/_ext/eclipse-groovy/LICENSE.txt +++ /dev/null @@ -1,70 +0,0 @@ -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: -i) changes to the Program, and -ii) additions to the Program; -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and -b) its license agreement: -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and -b) a copy of this Agreement must be included with each copy of the Program. -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/_ext/eclipse-groovy/README.md b/_ext/eclipse-groovy/README.md deleted file mode 100644 index 687ed7a132..0000000000 --- a/_ext/eclipse-groovy/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# spotless-eclipse-groovy - -Groovy-Eclipse is not available in a form which can be easily consumed by maven or gradle. -To fix this, we publish Groovy-Eclipse's formatter and all its dependencies, along with a small amount of glue code, into the `com.diffplug.gradle.spotless:spotless-eclipse-groovy` artifact. - -## Build - -To publish a new version, update the `_ext/eclipse-groovy/gradle.properties` appropriately and see [CONTRIBUTING.md](../../CONTRIBUTING.md) how to enable -`_ext` projects. - -## License - -Spotless at large is under the Apache 2.0 license, but this jar is under the EPL v1. diff --git a/_ext/eclipse-groovy/build.gradle b/_ext/eclipse-groovy/build.gradle deleted file mode 100644 index a45590fada..0000000000 --- a/_ext/eclipse-groovy/build.gradle +++ /dev/null @@ -1,56 +0,0 @@ -ext { - developers = [ - fvgh: [ name: 'Frank Vennemeyer', email: 'frankgh@zoho.com' ], - ] - - p2Repository = "https://dist.springsource.org/release/GRECLIPSE/${VER_GRECLIPSE}/e${VER_ECLIPSE}" - - p2Dependencies = [ - 'org.codehaus.groovy.eclipse.refactoring':'+', // GroovyFormatter and related - - // The following lists does not reflect the complete transitive required packages, but - // the once used during code formatting - 'org.codehaus.groovy':'+', // Groovy compiler patches supporting use within GrEclipse and Groovy itself - 'org.codehaus.groovy.eclipse.core':'+', // Groovy core classes (provides central logging used by formatter) - 'org.eclipse.jdt.core':"${VAR_GRECLIPSE_JDT_PATCH}", // Patches org.eclipse.jdt.core classes supporting use within GrEclipse (provides AST generator) - 'org.eclipse.jdt.groovy.core':'+' // Extends org.eclipse.jdt.core for Groovy - ] - - internalJars = [ - //Jars included by org.codehaus.groovy - ////////////////////////////////////////////////////////////////////////// - // Use Groovy compiler compatible with GrEclipse instead of localGroovy - "**/groovy-${VER_GROOVY}", - "**/groovy-parser2", - // Patches/Overrides some of the Groovy compiler classes - '**/groovy-eclipse', - // Provides logging capabilities for groovy-eclipse - '**/eclipse-trace', - //Jars included by org.eclipse.jdt.groovy.core - ////////////////////////////////////////////////////////////////////////// - //Non locking class loader used by groovy compiler - '**/nlcl' - ] - -} - -apply from: rootProject.file('_ext/gradle/update-lockfile.gradle') -apply from: rootProject.file('_ext/gradle/p2-fat-jar-setup.gradle') -apply from: rootProject.file('gradle/java-publish.gradle') - -dependencies { - implementation "com.diffplug.spotless:spotless-eclipse-base:${VER_SPOTLESS_ECLIPSE_BASE}" - // Provides text partitioners for formatters - implementation ("org.eclipse.platform:org.eclipse.jface.text:${VER_ECLIPSE_JFACE}") { - exclude group: 'org.eclipse.platform', module: 'org.eclipse.swt' - } - testImplementation("org.slf4j:slf4j-simple:${VER_SLF4J}") -} - -////////// -// Test // -////////// -sourceSets { - // Use JAR file with all resources for Eclipse-Groovy integration-tests - test.runtimeClasspath = jar.outputs.files + sourceSets.test.output + sourceSets.test.compileClasspath -} diff --git a/_ext/eclipse-groovy/gradle.properties b/_ext/eclipse-groovy/gradle.properties deleted file mode 100644 index c1c6101caa..0000000000 --- a/_ext/eclipse-groovy/gradle.properties +++ /dev/null @@ -1,14 +0,0 @@ -artifactId=spotless-eclipse-groovy -description=Groovy Eclipse's formatter bundled for Spotless - -# Build requirements -VER_JAVA=11 - -# Compile -VER_ECLIPSE=4.21 -VER_SPOTLESS_ECLIPSE_BASE=[3.4.2,4.0.0[ -VER_ECLIPSE_JFACE=[3.15.300,4.0.0[ -VER_GRECLIPSE=4.3.0 -VER_GROOVY=4.0.0 -# Use org.eclipse.jdt.core patched for Groovy-Eclipse -VAR_GRECLIPSE_JDT_PATCH=3.27.0.v202109301420-e2109-RELEASE diff --git a/_ext/eclipse-groovy/src/test/java/com/diffplug/spotless/extra/eclipse/groovy/GrEclipseFormatterStepImplTest.java b/_ext/eclipse-groovy/src/test/java/com/diffplug/spotless/extra/eclipse/groovy/GrEclipseFormatterStepImplTest.java deleted file mode 100644 index 011c68e148..0000000000 --- a/_ext/eclipse-groovy/src/test/java/com/diffplug/spotless/extra/eclipse/groovy/GrEclipseFormatterStepImplTest.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.diffplug.spotless.extra.eclipse.groovy; - -import static com.diffplug.spotless.extra.eclipse.groovy.GrEclipseFormatterStepImpl.IGNORE_FORMATTER_PROBLEMS; -import static org.codehaus.groovy.eclipse.refactoring.PreferenceConstants.*; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; - -import java.util.Properties; -import java.util.function.Consumer; - -import org.eclipse.jdt.core.JavaCore; -import org.junit.jupiter.api.Test; - -/** Smoke test checking that transitive dependencies are complete. */ -class GrEclipseFormatterStepImplTest { - - private final static TestData TEST_DATA = TestData.getTestDataOnFileSystem(); - private final static String PARSER_EXCEPTION = "class Test { void method() {} "; - private final static String SCANNER_EXCEPTION = "{"; - private final static String BOUNDED_WILDCARDS_UNFORMATTED = "foo(Map e)\n{\ne.clear();\n}"; - private final static String BOUNDED_WILDCARDS_FORMATTED = "foo(Map e) {\n\te.clear();\n}"; - - @Test - void defaultFormat() throws Throwable { - String output = format(TEST_DATA.input("nominal.test"), config -> {}); - assertEquals(TEST_DATA.expected("nominal.test"), - output, "Unexpected default formatting."); - } - - @Test - void validConfiguration() throws Throwable { - String output = format(TEST_DATA.input("nominal.test"), config -> { - config.put(GROOVY_FORMATTER_REMOVE_UNNECESSARY_SEMICOLONS, "true"); - }); - assertEquals(TEST_DATA.expected("nominal.test").replace(";", ""), - output, "Unexpected formatting for custom configuration."); - } - - @Test - void invalidConfiguration() throws Throwable { - String output = format(TEST_DATA.input("nominal.test"), config -> { - config.put(GROOVY_FORMATTER_INDENTATION, JavaCore.SPACE); - config.put(GROOVY_FORMATTER_INDENTATION_SIZE, "noInteger"); - }); - assertEquals(TEST_DATA.expected("nominal.test").replace("\t", " "), - output, "Groovy formatter does not replace invalid preferences by their defaults."); - } - - /** Test the handling AntlrParserPlugin exceptions by GroovyLogManager.manager logging */ - @Test - void parserException() throws Throwable { - assertThrows(IllegalArgumentException.class, () -> format(PARSER_EXCEPTION, config -> {})); - } - - /** Test the handling GroovyDocumentScanner exceptions by GroovyCore logging */ - @Test - void scannerException() throws Throwable { - assertThrows(IllegalArgumentException.class, () -> format(SCANNER_EXCEPTION, config -> {})); - } - - /** - * Test the handling bounded wildcards templates - * No exception since Groovy-Eclipse 3.0.0. - * Formatting fixed with Groovy-Eclipse 3.14 (org.codehaus.groovy:groovy[3.+]). - */ - @Test - void boundedWildCards() throws Throwable { - String output = format(BOUNDED_WILDCARDS_UNFORMATTED, config -> {}); - assertEquals(BOUNDED_WILDCARDS_FORMATTED, - output, "Unexpected formatting after bounded wildcards."); - } - - @Test - void ignoreCompilerProblems() throws Throwable { - Consumer ignoreCompilerProblems = config -> { - config.setProperty(IGNORE_FORMATTER_PROBLEMS, "true"); - }; - format(PARSER_EXCEPTION, ignoreCompilerProblems); - format(SCANNER_EXCEPTION, ignoreCompilerProblems); - //Test is passed if it does not throw an exception. See issue 237. - } - - private static String format(final String input, final Consumer config) throws Exception { - Properties properties = new Properties(); - config.accept(properties); - GrEclipseFormatterStepImpl formatter = new GrEclipseFormatterStepImpl(properties); - return formatter.format(input); - } - -} diff --git a/_ext/eclipse-groovy/src/test/java/com/diffplug/spotless/extra/eclipse/groovy/TestData.java b/_ext/eclipse-groovy/src/test/java/com/diffplug/spotless/extra/eclipse/groovy/TestData.java deleted file mode 100644 index b0e4f525da..0000000000 --- a/_ext/eclipse-groovy/src/test/java/com/diffplug/spotless/extra/eclipse/groovy/TestData.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.diffplug.spotless.extra.eclipse.groovy; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; - -public class TestData { - public static TestData getTestDataOnFileSystem() { - final String userDir = System.getProperty("user.dir", "."); - Path dataPath = Paths.get(userDir, "src", "test", "resources"); - if (Files.isDirectory(dataPath)) { - return new TestData(dataPath); - } - return null; - } - - private final Path inputPath; - private final Path expectedPath; - - private TestData(Path dataPath) { - inputPath = dataPath.resolve("input").toAbsolutePath(); - expectedPath = dataPath.resolve("expected").toAbsolutePath(); - for (Path testDataDir : new Path[]{inputPath, expectedPath}) { - if (!Files.isDirectory(testDataDir)) { - throw new IllegalArgumentException(String.format("'%1$s' is not a directory.", testDataDir)); - } - } - } - - public String input(final String fileName) throws Exception { - return read(inputPath.resolve(fileName)); - } - - public String expected(final String fileName) { - Path path = expectedPath.resolve(fileName); - return read(path); - } - - private String read(final Path xmlPath) { - if (!Files.isRegularFile(xmlPath)) { - throw new IllegalArgumentException(String.format("'%1$s' is not a regular file.", xmlPath)); - } - try { - String checkedOutFileContent = new String(java.nio.file.Files.readAllBytes(xmlPath), "UTF8"); - return checkedOutFileContent.replace("\r", ""); //Align GIT end-of-line normalization - } catch (IOException e) { - throw new IllegalArgumentException(String.format("Failed to read '%1$s'.", xmlPath), e); - } - } - -} diff --git a/_ext/eclipse-groovy/src/test/resources/expected/nominal.test b/_ext/eclipse-groovy/src/test/resources/expected/nominal.test deleted file mode 100644 index a40d247bad..0000000000 --- a/_ext/eclipse-groovy/src/test/resources/expected/nominal.test +++ /dev/null @@ -1,13 +0,0 @@ -class TestClass { - def a; - - TestClass(String s) { - this.a = s - } - def methodNamedArgs(Map args) { - "named args: $args" - } -} - -def t = new TestClass() -def arr = [4, 'string1', 'string2'] diff --git a/_ext/eclipse-groovy/src/test/resources/input/nominal.test b/_ext/eclipse-groovy/src/test/resources/input/nominal.test deleted file mode 100644 index 85f742677f..0000000000 --- a/_ext/eclipse-groovy/src/test/resources/input/nominal.test +++ /dev/null @@ -1,15 +0,0 @@ -class TestClass { - def a; - -TestClass(String s) { -this.a = s -} - def methodNamedArgs(Map args) { - "named args: $args" - } -} - -def t = new TestClass() -def arr = [4, -'string1', -'string2'] diff --git a/_ext/eclipse-jdt/CHANGES.md b/_ext/eclipse-jdt/CHANGES.md deleted file mode 100644 index d698ce2c6c..0000000000 --- a/_ext/eclipse-jdt/CHANGES.md +++ /dev/null @@ -1,15 +0,0 @@ -# spotless-eclipse-jdt - -We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `4.8.0`). - -## [Unreleased] - -## [4.8.1] - 2021-10-04 -### Changed -* Bumped minimum supported Eclipse JDT core version to 3.27.0 -* `format` interface requires source file information to distinguish module-info from compilation unit. Old interface marked as deprecated. -### Fixed -* Fixed module-info formatting. Previous versions did not recognized content and skipped formatting. - -## [4.8.0] - 2018-07-19 -* Initial release! diff --git a/_ext/eclipse-jdt/LICENSE.txt b/_ext/eclipse-jdt/LICENSE.txt deleted file mode 100644 index 3d967aee74..0000000000 --- a/_ext/eclipse-jdt/LICENSE.txt +++ /dev/null @@ -1,70 +0,0 @@ -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: -i) changes to the Program, and -ii) additions to the Program; -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and -b) its license agreement: -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and -b) a copy of this Agreement must be included with each copy of the Program. -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. \ No newline at end of file diff --git a/_ext/eclipse-jdt/README.md b/_ext/eclipse-jdt/README.md deleted file mode 100644 index 624e577e0d..0000000000 --- a/_ext/eclipse-jdt/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# spotless-eclipse-jdt - -Eclipse JDT and its dependencies require a large amount of byte code. -Hence they should not be directly be required by the Spotless, but only be requested in case -they are configured by the Spotless configuration. Hence we publish Eclipse's formatter and all its dependencies, along with a small amount of glue code, into the `com.diffplug.gradle.spotless:spotless-eclipse-jdt` artifact. - -To publish a new version, update the `_ext/eclipse-jdt/gradle.properties` appropriately and see [CONTRIBUTING.md](../../CONTRIBUTING.md) how to enable -`_ext` projects. - -## License - -Spotless at large is under the Apache 2.0 license, but this jar is under the EPL v1. diff --git a/_ext/eclipse-jdt/build.gradle b/_ext/eclipse-jdt/build.gradle deleted file mode 100644 index 283e52f86d..0000000000 --- a/_ext/eclipse-jdt/build.gradle +++ /dev/null @@ -1,19 +0,0 @@ -apply from: rootProject.file('_ext/gradle/update-lockfile.gradle') -apply from: rootProject.file('_ext/gradle/java-setup.gradle') -apply from: rootProject.file('gradle/java-publish.gradle') - -ext { - developers = [ - fvgh: [ name: 'Frank Vennemeyer', email: 'frankgh@zoho.com' ], - nedtwigg: [ name: 'Ned Twigg', email: 'ned.twigg@diffplug.com' ], - ] -} - -dependencies { - implementation "com.diffplug.spotless:spotless-eclipse-base:${VER_SPOTLESS_ECLIPSE_BASE}" - implementation("org.eclipse.jdt:org.eclipse.jdt.core:${VER_ECLIPSE_JDT_CORE}") { - 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' - } -} \ No newline at end of file diff --git a/_ext/eclipse-jdt/gradle.properties b/_ext/eclipse-jdt/gradle.properties deleted file mode 100644 index 51d5f41014..0000000000 --- a/_ext/eclipse-jdt/gradle.properties +++ /dev/null @@ -1,9 +0,0 @@ -artifactId=spotless-eclipse-jdt -description=Eclipse's JDT formatter bundled for Spotless - -# Build requirements -VER_JAVA=11 - -# Compile -VER_ECLIPSE_JDT_CORE=[3.13.0,4.0.0[ -VER_SPOTLESS_ECLIPSE_BASE=[3.5.0,4.0.0[ diff --git a/_ext/eclipse-jdt/src/main/java/com/diffplug/spotless/extra/eclipse/java/package-info.java b/_ext/eclipse-jdt/src/main/java/com/diffplug/spotless/extra/eclipse/java/package-info.java deleted file mode 100644 index 190557cc74..0000000000 --- a/_ext/eclipse-jdt/src/main/java/com/diffplug/spotless/extra/eclipse/java/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2016 DiffPlug - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** Eclipse JDT based Spotless formatter */ -@ParametersAreNonnullByDefault -package com.diffplug.spotless.extra.eclipse.java; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/_ext/eclipse-jdt/src/test/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImplTest.java b/_ext/eclipse-jdt/src/test/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImplTest.java deleted file mode 100644 index cef63072c9..0000000000 --- a/_ext/eclipse-jdt/src/test/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImplTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.diffplug.spotless.extra.eclipse.java; - -import static org.junit.jupiter.api.Assertions.*; - -import java.io.File; -import java.io.IOException; -import java.util.Properties; - -import org.eclipse.jdt.core.JavaCore; -import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import com.diffplug.spotless.FormatterProperties; -import com.diffplug.spotless.ResourceHarness; - -/** Eclipse JDT wrapper integration tests */ -class EclipseJdtFormatterStepImplTest extends ResourceHarness { - - private static String UNFORMATTED; - private static String FORMATTED; - - @BeforeAll - static void beforeAll() throws IOException { - UNFORMATTED = getTestResource("java/eclipse/JavaCodeUnformatted.test"); - FORMATTED = getTestResource("java/eclipse/JavaCodeFormatted.test"); - } - - private Properties config; - - @BeforeEach - void beforeEach() throws IOException { - File settingsFile = createTestFile("java/eclipse/formatter.xml"); - config = FormatterProperties.from(settingsFile).getProperties(); - } - - private final static String ILLEGAL_CHAR = Character.toString((char) 254); - - @Test - void nominal() throws Throwable { - assertEquals(FORMATTED, format(UNFORMATTED)); - } - - @Test - public void invalidSyntax() throws Throwable { - try { - String invalidSyntax = FORMATTED.replace("{", ""); - assertEquals(invalidSyntax, format(invalidSyntax)); - } catch (IndexOutOfBoundsException e) { - /* - * Some JDT versions throw exception, but this changed again in later versions. - * Anyhow, exceptions are acceptable, since Spotless should format valid Java code. - */ - } - } - - @Test - void invalidCharater() throws Throwable { - String invalidInput = UNFORMATTED + ILLEGAL_CHAR; - assertEquals(invalidInput, format(invalidInput)); - } - - @Test - void invalidConfiguration() throws Throwable { - config.setProperty(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE); - config.setProperty(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "noInteger"); - String defaultTabReplacement = " "; - assertEquals(FORMATTED.replace("\t", defaultTabReplacement), format(FORMATTED)); - } - - @Test - void htmlPreTag() throws Throwable { - config.clear(); - config.setProperty( - DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_HEADER, - DefaultCodeFormatterConstants.TRUE); - String formatted = getTestResource("java/eclipse/HtmlPreTagFormatted.test"); - String unformatted = getTestResource("java/eclipse/HtmlPreTagUnformatted.test"); - assertEquals(formatted, format(unformatted), "Failed to create internal code formatter. See Spotless issue #191"); - } - - @Test - void moduleInfo() throws Throwable { - File settingsFile = createTestFile("java/eclipse/ModuleInfo.prefs"); - config = FormatterProperties.from(settingsFile).getProperties(); - String formatted = getTestResource("java/eclipse/ModuleInfoFormatted.test"); - String unformatted = getTestResource("java/eclipse/ModuleInfoUnformatted.test"); - assertEquals(formatted, format(unformatted, "whatever/module-info.java"), "Jvm9 module info not formatted."); - } - - private String format(final String input) throws Exception { - return format(input, ""); - } - - private String format(final String input, final String fileName) throws Exception { - EclipseJdtFormatterStepImpl formatter = new EclipseJdtFormatterStepImpl(config); - return formatter.format(input, new File(fileName)); - } - -} diff --git a/build.gradle b/build.gradle index 312f84727d..c51f73751c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,4 @@ -plugins { - // https://github.com/equodev/equo-ide/blob/main/plugin-gradle/CHANGELOG.md - id 'dev.equo.ide' version '0.16.0' -} +apply plugin: 'dev.equo.ide' equoIde { branding().title('Spotless').icon(file('_images/spotless_logo.png')) welcome().openUrl('https://github.com/diffplug/spotless/blob/main/CONTRIBUTING.md') diff --git a/gradle/java-publish.gradle b/gradle/java-publish.gradle index 2ebc2a66b5..495694a5be 100644 --- a/gradle/java-publish.gradle +++ b/gradle/java-publish.gradle @@ -77,12 +77,11 @@ javadoc { // // Thus, no javadoc warnings. options.addStringOption('Xdoclint:none', '-quiet') - options.addStringOption('source', '8') + options.addStringOption('source', '11') // setup the header options.header javadocInfo // setup links - options.linksOffline('https://docs.oracle.com/javase/8/docs/api/', "${dotdotGradle}/javadoc/java8") - options.linksOffline('https://docs.gradle.org/2.14/javadoc/', "${dotdotGradle}/javadoc/gradle") + options.linksOffline('https://docs.gradle.org/6.1.1/javadoc/', "${dotdotGradle}/javadoc/gradle") // links to javadoc from the other versions options.linksOffline("https://javadoc.io/static/com.diffplug.spotless/spotless-lib/${rootProject.spotlessChangelog.versionLast}", "${dotdotGradle}/javadoc/spotless-lib") diff --git a/gradle/javadoc/java8/package-list b/gradle/javadoc/java8/package-list deleted file mode 100644 index 496d90dbfa..0000000000 --- a/gradle/javadoc/java8/package-list +++ /dev/null @@ -1,216 +0,0 @@ -java.applet -java.awt -java.awt.color -java.awt.datatransfer -java.awt.dnd -java.awt.event -java.awt.font -java.awt.geom -java.awt.im -java.awt.im.spi -java.awt.image -java.awt.image.renderable -java.awt.print -java.beans -java.beans.beancontext -java.io -java.lang -java.lang.annotation -java.lang.instrument -java.lang.invoke -java.lang.management -java.lang.ref -java.lang.reflect -java.math -java.net -java.nio -java.nio.channels -java.nio.channels.spi -java.nio.charset -java.nio.charset.spi -java.nio.file -java.nio.file.attribute -java.nio.file.spi -java.rmi -java.rmi.activation -java.rmi.dgc -java.rmi.registry -java.rmi.server -java.security -java.security.acl -java.security.cert -java.security.interfaces -java.security.spec -java.sql -java.text -java.text.spi -java.time -java.time.chrono -java.time.format -java.time.temporal -java.time.zone -java.util -java.util.concurrent -java.util.concurrent.atomic -java.util.concurrent.locks -java.util.function -java.util.jar -java.util.prefs -java.util.regex -java.util.spi -java.util.stream -java.util.zip -javax.accessibility -javax.activation -javax.activity -javax.annotation -javax.annotation.processing -javax.crypto -javax.crypto.interfaces -javax.crypto.spec -javax.imageio -javax.imageio.event -javax.imageio.metadata -javax.imageio.plugins.bmp -javax.imageio.plugins.jpeg -javax.imageio.spi -javax.imageio.stream -javax.jws -javax.jws.soap -javax.lang.model -javax.lang.model.element -javax.lang.model.type -javax.lang.model.util -javax.management -javax.management.loading -javax.management.modelmbean -javax.management.monitor -javax.management.openmbean -javax.management.relation -javax.management.remote -javax.management.remote.rmi -javax.management.timer -javax.naming -javax.naming.directory -javax.naming.event -javax.naming.ldap -javax.naming.spi -javax.net -javax.net.ssl -javax.print -javax.print.attribute -javax.print.attribute.standard -javax.print.event -javax.rmi -javax.rmi.CORBA -javax.rmi.ssl -javax.script -javax.security.auth -javax.security.auth.callback -javax.security.auth.kerberos -javax.security.auth.login -javax.security.auth.spi -javax.security.auth.x500 -javax.security.cert -javax.security.sasl -javax.sound.midi -javax.sound.midi.spi -javax.sound.sampled -javax.sound.sampled.spi -javax.sql -javax.sql.rowset -javax.sql.rowset.serial -javax.sql.rowset.spi -javax.swing -javax.swing.border -javax.swing.colorchooser -javax.swing.event -javax.swing.filechooser -javax.swing.plaf -javax.swing.plaf.basic -javax.swing.plaf.metal -javax.swing.plaf.multi -javax.swing.plaf.nimbus -javax.swing.plaf.synth -javax.swing.table -javax.swing.text -javax.swing.text.html -javax.swing.text.html.parser -javax.swing.text.rtf -javax.swing.tree -javax.swing.undo -javax.tools -javax.transaction -javax.transaction.xa -javax.xml -javax.xml.bind -javax.xml.bind.annotation -javax.xml.bind.annotation.adapters -javax.xml.bind.attachment -javax.xml.bind.helpers -javax.xml.bind.util -javax.xml.crypto -javax.xml.crypto.dom -javax.xml.crypto.dsig -javax.xml.crypto.dsig.dom -javax.xml.crypto.dsig.keyinfo -javax.xml.crypto.dsig.spec -javax.xml.datatype -javax.xml.namespace -javax.xml.parsers -javax.xml.soap -javax.xml.stream -javax.xml.stream.events -javax.xml.stream.util -javax.xml.transform -javax.xml.transform.dom -javax.xml.transform.sax -javax.xml.transform.stax -javax.xml.transform.stream -javax.xml.validation -javax.xml.ws -javax.xml.ws.handler -javax.xml.ws.handler.soap -javax.xml.ws.http -javax.xml.ws.soap -javax.xml.ws.spi -javax.xml.ws.spi.http -javax.xml.ws.wsaddressing -javax.xml.xpath -org.ietf.jgss -org.omg.CORBA -org.omg.CORBA.DynAnyPackage -org.omg.CORBA.ORBPackage -org.omg.CORBA.TypeCodePackage -org.omg.CORBA.portable -org.omg.CORBA_2_3 -org.omg.CORBA_2_3.portable -org.omg.CosNaming -org.omg.CosNaming.NamingContextExtPackage -org.omg.CosNaming.NamingContextPackage -org.omg.Dynamic -org.omg.DynamicAny -org.omg.DynamicAny.DynAnyFactoryPackage -org.omg.DynamicAny.DynAnyPackage -org.omg.IOP -org.omg.IOP.CodecFactoryPackage -org.omg.IOP.CodecPackage -org.omg.Messaging -org.omg.PortableInterceptor -org.omg.PortableInterceptor.ORBInitInfoPackage -org.omg.PortableServer -org.omg.PortableServer.CurrentPackage -org.omg.PortableServer.POAManagerPackage -org.omg.PortableServer.POAPackage -org.omg.PortableServer.ServantLocatorPackage -org.omg.PortableServer.portable -org.omg.SendingContext -org.omg.stub.java.rmi -org.w3c.dom -org.w3c.dom.bootstrap -org.w3c.dom.events -org.w3c.dom.ls -org.w3c.dom.views -org.xml.sax -org.xml.sax.ext -org.xml.sax.helpers diff --git a/lib-extra/build.gradle b/lib-extra/build.gradle index 8381d14041..491531f0c7 100644 --- a/lib-extra/build.gradle +++ b/lib-extra/build.gradle @@ -1,11 +1,13 @@ plugins { id 'java-library' + id 'dev.equo.p2deps' } ext.artifactId = project.artifactIdLibExtra version = rootProject.spotlessChangelog.versionNext apply from: rootProject.file('gradle/java-setup.gradle') apply from: rootProject.file('gradle/java-publish.gradle') +String VER_SOLSTICE = '1.0.0' dependencies { api project(':lib') // misc useful utilities @@ -14,6 +16,8 @@ dependencies { // needed by GitAttributesLineEndings implementation "org.eclipse.jgit:org.eclipse.jgit:${VER_JGIT}" implementation "com.googlecode.concurrent-trees:concurrent-trees:2.6.1" + // for eclipse + implementation "dev.equo.ide:solstice:${VER_SOLSTICE}" // testing testImplementation project(':testlib') @@ -21,9 +25,11 @@ dependencies { testImplementation "org.assertj:assertj-core:${VER_ASSERTJ}" testImplementation "com.diffplug.durian:durian-testlib:${VER_DURIAN}" } - -// we'll hold the core lib to a high standard -spotbugs { reportLevel = 'low' } // low|medium|high (low = sensitive to even minor mistakes) +spotless { + java { + replaceRegex 'enforceSolsticeVersion', '"dev.equo.ide:solstice:(.*)"', '"dev.equo.ide:solstice:' + VER_SOLSTICE + '"' + } +} apply from: rootProject.file('gradle/special-tests.gradle') tasks.withType(Test).configureEach { @@ -32,3 +38,55 @@ tasks.withType(Test).configureEach { jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED' } } + +def NEEDS_P2_DEPS = [ + 'jdt', + 'groovy', + 'cdt' +] +for (needsP2 in NEEDS_P2_DEPS) { + sourceSets.register(needsP2) { + compileClasspath += sourceSets.main.output + runtimeClasspath += sourceSets.main.output + java {} + } + dependencies { + add("${needsP2}CompileOnly", "dev.equo.ide:solstice:${VER_SOLSTICE}") + } +} +jar { + for (needsP2 in NEEDS_P2_DEPS) { + from sourceSets.getByName(needsP2).output.classesDirs + } +} +tasks.withType(Test).configureEach { + dependsOn jar + doFirst { + classpath += jar.outputs.files + } +} + +apply plugin: 'dev.equo.p2deps' +p2deps { + into 'jdtCompileOnly', { + p2repo 'https://download.eclipse.org/eclipse/updates/4.26/' + install 'org.eclipse.jdt.core' + } + into 'groovyCompileOnly', { + p2repo 'https://download.eclipse.org/eclipse/updates/4.26/' + p2repo 'https://groovy.jfrog.io/artifactory/plugins-release/org/codehaus/groovy/groovy-eclipse-integration/4.8.0/e4.26/' + install 'org.codehaus.groovy.eclipse.refactoring' + install 'org.codehaus.groovy.eclipse.core' + install 'org.eclipse.jdt.groovy.core' + install 'org.codehaus.groovy' + } + 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' + } +} + +// we'll hold the core lib to a high standard +spotbugs { reportLevel = 'low' } // low|medium|high (low = sensitive to even minor mistakes) + diff --git a/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java b/lib-extra/src/cdt/java/com/diffplug/spotless/extra/glue/cdt/EclipseCdtFormatterStepImpl.java similarity index 66% rename from _ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java rename to lib-extra/src/cdt/java/com/diffplug/spotless/extra/glue/cdt/EclipseCdtFormatterStepImpl.java index 4482f3e752..045860f535 100644 --- a/_ext/eclipse-cdt/src/main/java/com/diffplug/spotless/extra/eclipse/cdt/EclipseCdtFormatterStepImpl.java +++ b/lib-extra/src/cdt/java/com/diffplug/spotless/extra/glue/cdt/EclipseCdtFormatterStepImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2020 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.diffplug.spotless.extra.eclipse.cdt; +package com.diffplug.spotless.extra.glue.cdt; import java.util.Map; import java.util.Map.Entry; @@ -21,23 +21,16 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.formatter.CodeFormatter; import org.eclipse.jface.text.Document; import org.eclipse.jface.text.IDocument; import org.eclipse.text.edits.TextEdit; -import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseConfig; -import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseFramework; -import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipsePluginConfig; -import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseServiceConfig; - /** Formatter step which calls out to the Eclipse CDT formatter. */ public class EclipseCdtFormatterStepImpl { private final CodeFormatter codeFormatter; public EclipseCdtFormatterStepImpl(Properties settings) throws Exception { - SpotlessEclipseFramework.setup(new FrameworkConfig()); Stream> stream = settings.entrySet().stream(); Map settingsMap = stream.collect(Collectors.toMap( e -> String.valueOf(e.getKey()), @@ -45,24 +38,10 @@ public EclipseCdtFormatterStepImpl(Properties settings) throws Exception { codeFormatter = org.eclipse.cdt.core.ToolFactory.createDefaultCodeFormatter(settingsMap); } - private static class FrameworkConfig implements SpotlessEclipseConfig { - @Override - public void registerServices(SpotlessEclipseServiceConfig config) { - config.applyDefault(); - config.useSlf4J(EclipseCdtFormatterStepImpl.class.getPackage().getName()); - } - - @Override - public void activatePlugins(SpotlessEclipsePluginConfig config) { - config.applyDefault(); - config.add(new CCorePlugin()); - } - } - /** Formatting C/C++ string */ public String format(String raw) throws Exception { //The 'kind' can be set to CodeFormatter.K_UNKNOWN, since it is anyway ignored by the internal formatter - TextEdit edit = codeFormatter.format(CodeFormatter.K_UNKNOWN, raw, 0, raw.length(), 0, SpotlessEclipseFramework.LINE_DELIMITER); + TextEdit edit = codeFormatter.format(CodeFormatter.K_UNKNOWN, raw, 0, raw.length(), 0, "\n"); if (edit == null) { throw new IllegalArgumentException("Invalid C/C++ syntax for formatting."); } else { diff --git a/_ext/eclipse-groovy/src/main/java/com/diffplug/spotless/extra/eclipse/groovy/GrEclipseFormatterStepImpl.java b/lib-extra/src/groovy/java/com/diffplug/spotless/extra/glue/groovy/GrEclipseFormatterStepImpl.java similarity index 78% rename from _ext/eclipse-groovy/src/main/java/com/diffplug/spotless/extra/eclipse/groovy/GrEclipseFormatterStepImpl.java rename to lib-extra/src/groovy/java/com/diffplug/spotless/extra/glue/groovy/GrEclipseFormatterStepImpl.java index 1d2b71c69f..9549847d74 100644 --- a/_ext/eclipse-groovy/src/main/java/com/diffplug/spotless/extra/eclipse/groovy/GrEclipseFormatterStepImpl.java +++ b/lib-extra/src/groovy/java/com/diffplug/spotless/extra/glue/groovy/GrEclipseFormatterStepImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,14 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.diffplug.spotless.extra.eclipse.groovy; +package com.diffplug.spotless.extra.glue.groovy; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.nio.file.Files; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Map; import java.util.Properties; import org.codehaus.groovy.eclipse.GroovyLogManager; @@ -37,15 +39,36 @@ import org.eclipse.jface.text.Document; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.TextSelection; +import org.eclipse.osgi.internal.location.EquinoxLocations; import org.eclipse.text.edits.TextEdit; +import org.osgi.framework.Constants; -import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseConfig; -import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseFramework; -import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipsePluginConfig; -import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseServiceConfig; +import dev.equo.solstice.NestedJars; +import dev.equo.solstice.ShimIdeBootstrapServices; +import dev.equo.solstice.Solstice; +import dev.equo.solstice.p2.CacheLocations; /** Spotless-Formatter step which calls out to the Groovy-Eclipse formatter. */ public class GrEclipseFormatterStepImpl { + static { + NestedJars.setToWarnOnly(); + NestedJars.onClassPath().confirmAllNestedJarsArePresentOnClasspath(CacheLocations.nestedJars()); + try { + var solstice = Solstice.findBundlesOnClasspath(); + solstice.warnAndModifyManifestsToFix(); + var props = Map.of("osgi.nl", "en_US", + Constants.FRAMEWORK_STORAGE_CLEAN, Constants.FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT, + EquinoxLocations.PROP_INSTANCE_AREA, Files.createTempDirectory("spotless-groovy").toAbsolutePath().toString()); + solstice.openShim(props); + ShimIdeBootstrapServices.apply(props, solstice.getContext()); + solstice.start("org.apache.felix.scr"); + solstice.startAllWithLazy(false); + solstice.start("org.codehaus.groovy.eclipse.core"); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + /** * Groovy compiler problems can be ignored. *

@@ -58,25 +81,11 @@ public class GrEclipseFormatterStepImpl { private final boolean ignoreFormatterProblems; public GrEclipseFormatterStepImpl(final Properties properties) throws Exception { - SpotlessEclipseFramework.setup(new FrameworkConfig()); PreferenceStore preferences = createPreferences(properties); preferencesStore = new FormatterPreferencesOnStore(preferences); ignoreFormatterProblems = Boolean.parseBoolean(properties.getProperty(IGNORE_FORMATTER_PROBLEMS, "false")); } - private static class FrameworkConfig implements SpotlessEclipseConfig { - @Override - public void registerServices(SpotlessEclipseServiceConfig config) { - config.applyDefault(); - config.useSlf4J(GrEclipseFormatterStepImpl.class.getPackage().getName()); - } - - @Override - public void activatePlugins(SpotlessEclipsePluginConfig config) { - config.add(new GroovyCoreActivator()); - } - } - /** Formatting Groovy string */ public String format(String raw) throws Exception { IDocument doc = new Document(raw); @@ -94,8 +103,7 @@ public String format(String raw) throws Exception { /** * Eclipse Groovy formatter does not signal problems by its return value, but by logging errors. */ - private static class GroovyErrorListener implements ILogListener, IGroovyLogger { - + private static final class GroovyErrorListener implements ILogListener, IGroovyLogger { private final List errors; public GroovyErrorListener() { @@ -106,7 +114,7 @@ public GroovyErrorListener() { errors = Collections.synchronizedList(new ArrayList()); ILog groovyLogger = GroovyCoreActivator.getDefault().getLog(); groovyLogger.addLogListener(this); - synchronized(GroovyLogManager.manager) { + synchronized (GroovyLogManager.manager) { GroovyLogManager.manager.addLogger(this); } } @@ -119,7 +127,7 @@ public void logging(final IStatus status, final String plugin) { public boolean errorsDetected() { ILog groovyLogger = GroovyCoreActivator.getDefault().getLog(); groovyLogger.removeLogListener(this); - synchronized(GroovyLogManager.manager) { + synchronized (GroovyLogManager.manager) { GroovyLogManager.manager.removeLogger(this); } return 0 != errors.size(); @@ -156,7 +164,6 @@ public boolean isCategoryEnabled(TraceCategory cat) { public void log(TraceCategory arg0, String arg1) { errors.add(arg1); } - } private static PreferenceStore createPreferences(final Properties properties) throws IOException { @@ -167,5 +174,4 @@ private static PreferenceStore createPreferences(final Properties properties) th preferences.load(input); return preferences; } - } diff --git a/_ext/eclipse-jdt/src/main/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImpl.java b/lib-extra/src/jdt/java/com/diffplug/spotless/extra/glue/jdt/EclipseJdtFormatterStepImpl.java similarity index 59% rename from _ext/eclipse-jdt/src/main/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImpl.java rename to lib-extra/src/jdt/java/com/diffplug/spotless/extra/glue/jdt/EclipseJdtFormatterStepImpl.java index b3fb7acaf3..40c02d8f3a 100644 --- a/_ext/eclipse-jdt/src/main/java/com/diffplug/spotless/extra/eclipse/java/EclipseJdtFormatterStepImpl.java +++ b/lib-extra/src/jdt/java/com/diffplug/spotless/extra/glue/jdt/EclipseJdtFormatterStepImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,12 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.diffplug.spotless.extra.eclipse.java; +package com.diffplug.spotless.extra.glue.jdt; import java.io.File; import java.util.Properties; -import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.ToolFactory; import org.eclipse.jdt.core.formatter.CodeFormatter; import org.eclipse.jdt.internal.compiler.env.IModule; @@ -26,47 +25,22 @@ import org.eclipse.jface.text.IDocument; import org.eclipse.text.edits.TextEdit; -import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseConfig; -import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseFramework; -import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipsePluginConfig; -import com.diffplug.spotless.extra.eclipse.base.SpotlessEclipseServiceConfig; - /** Formatter step which calls out to the Eclipse JDT formatter. */ public class EclipseJdtFormatterStepImpl { + /** Spotless demands for internal formatter chains Unix (LF) line endings. */ + public static final String LINE_DELIMITER = "\n"; private final CodeFormatter codeFormatter; - public EclipseJdtFormatterStepImpl(Properties settings) throws Exception { - SpotlessEclipseFramework.setup(new FrameworkConfig()); + public EclipseJdtFormatterStepImpl(Properties settings) { this.codeFormatter = ToolFactory.createCodeFormatter(settings, ToolFactory.M_FORMAT_EXISTING); } - private static class FrameworkConfig implements SpotlessEclipseConfig { - @Override - public void registerServices(SpotlessEclipseServiceConfig config) { - config.applyDefault(); - config.useSlf4J(EclipseJdtFormatterStepImpl.class.getPackage().getName()); - } - - @Override - public void activatePlugins(SpotlessEclipsePluginConfig config) { - config.applyDefault(); - config.add(new JavaCore()); - } - } - - /** @deprecated Use {@link #format(String, File)} instead. */ - @Deprecated - public String format(String raw) throws Exception { - return format(raw, new File("")); - } - /** Formatting Java string, distinguishing module-info and compilation unit by file name */ public String format(String raw, File file) throws Exception { int kind = (file.getName().equals(IModule.MODULE_INFO_JAVA) ? CodeFormatter.K_MODULE_INFO : CodeFormatter.K_COMPILATION_UNIT) | CodeFormatter.F_INCLUDE_COMMENTS; - - TextEdit edit = codeFormatter.format(kind, raw, 0, raw.length(), 0, SpotlessEclipseFramework.LINE_DELIMITER); + TextEdit edit = codeFormatter.format(kind, raw, 0, raw.length(), 0, LINE_DELIMITER); if (edit == null) { throw new IllegalArgumentException("Invalid java syntax for formatting."); } else { @@ -75,5 +49,4 @@ public String format(String raw, File file) throws Exception { return doc.get(); } } - } diff --git a/lib-extra/src/main/java/com/diffplug/spotless/extra/EquoBasedStepBuilder.java b/lib-extra/src/main/java/com/diffplug/spotless/extra/EquoBasedStepBuilder.java new file mode 100644 index 0000000000..5283321cec --- /dev/null +++ b/lib-extra/src/main/java/com/diffplug/spotless/extra/EquoBasedStepBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2016-2023 DiffPlug + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.diffplug.spotless.extra; + +import java.io.File; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; + +import com.diffplug.spotless.FileSignature; +import com.diffplug.spotless.FormatterFunc; +import com.diffplug.spotless.FormatterProperties; +import com.diffplug.spotless.FormatterStep; +import com.diffplug.spotless.JarState; +import com.diffplug.spotless.Provisioner; +import com.diffplug.spotless.ThrowingEx; + +import dev.equo.solstice.NestedJars; +import dev.equo.solstice.p2.P2ClientCache; +import dev.equo.solstice.p2.P2Model; +import dev.equo.solstice.p2.P2QueryCache; + +/** + * Generic Eclipse based formatter step {@link State} builder. + */ +public abstract class EquoBasedStepBuilder { + private final String formatterName; + private final Provisioner mavenProvisioner; + private final ThrowingEx.Function stateToFormatter; + private String formatterVersion; + private Iterable settingsFiles = new ArrayList<>(); + + /** Initialize valid default configuration, taking latest version */ + public EquoBasedStepBuilder(String formatterName, Provisioner mavenProvisioner, ThrowingEx.Function stateToFormatter) { + this.formatterName = formatterName; + this.mavenProvisioner = mavenProvisioner; + this.stateToFormatter = stateToFormatter; + } + + public void setVersion(String version) { + formatterVersion = version; + } + + public void setPreferences(Iterable settingsFiles) { + this.settingsFiles = settingsFiles; + } + + /** Returns the FormatterStep (whose state will be calculated lazily). */ + public FormatterStep build() { + return FormatterStep.createLazy(formatterName, this::get, stateToFormatter); + } + + protected abstract P2Model model(String version); + + protected void addPlatformRepo(P2Model model, String version) { + if (!version.startsWith("4.")) { + throw new IllegalArgumentException("Expected 4.x"); + } + int minorVersion = Integer.parseInt(version.substring("4.".length())); + + model.addP2Repo("https://download.eclipse.org/eclipse/updates/" + version + "/"); + model.getInstall().addAll(List.of( + "org.apache.felix.scr", + "org.eclipse.equinox.event")); + if (minorVersion >= 25) { + model.getInstall().addAll(List.of( + "org.osgi.service.cm", + "org.osgi.service.metatype")); + } + } + + /** Creates the state of the configuration. */ + EquoBasedStepBuilder.State get() throws Exception { + var query = model(formatterVersion).query(P2ClientCache.PREFER_OFFLINE, P2QueryCache.ALLOW); + var classpath = new ArrayList(); + var mavenDeps = new ArrayList(); + mavenDeps.add("dev.equo.ide:solstice:1.0.0"); + mavenDeps.add("com.diffplug.durian:durian-swt.os:4.1.1"); + mavenDeps.addAll(query.getJarsOnMavenCentral()); + classpath.addAll(mavenProvisioner.provisionWithTransitives(false, mavenDeps)); + classpath.addAll(query.getJarsNotOnMavenCentral()); + for (var nested : NestedJars.inFiles(query.getJarsNotOnMavenCentral()).extractAllNestedJars()) { + classpath.add(nested.getValue()); + } + var jarState = JarState.preserveOrder(classpath); + return new State(formatterVersion, jarState, FileSignature.signAsList(settingsFiles)); + } + + /** + * State of Eclipse configuration items, providing functionality to derived information + * based on the state. + */ + public static class State implements Serializable { + private static final long serialVersionUID = 584400372246020995L; + final String semanticVersion; + final JarState jarState; + final FileSignature settingsFiles; + + public State(String semanticVersion, JarState jarState, FileSignature settingsFiles) { + this.semanticVersion = semanticVersion; + this.jarState = jarState; + this.settingsFiles = settingsFiles; + } + + public JarState getJarState() { + return jarState; + } + + public String getSemanticVersion() { + return semanticVersion; + } + + public Properties getPreferences() { + return FormatterProperties.from(settingsFiles.files()).getProperties(); + } + } +} diff --git a/lib-extra/src/main/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStep.java b/lib-extra/src/main/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStep.java index 4c2b06fc9a..1a83389eaa 100644 --- a/lib-extra/src/main/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStep.java +++ b/lib-extra/src/main/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,14 +15,15 @@ */ package com.diffplug.spotless.extra.cpp; -import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; import java.util.Properties; import com.diffplug.spotless.FormatterFunc; import com.diffplug.spotless.Jvm; import com.diffplug.spotless.Provisioner; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder.State; +import com.diffplug.spotless.extra.EquoBasedStepBuilder; + +import dev.equo.solstice.p2.P2Model; /** * Formatter step which calls out to the Eclipse CDT formatter. @@ -36,25 +37,40 @@ public final class EclipseCdtFormatterStep { private EclipseCdtFormatterStep() {} private static final String NAME = "eclipse cdt formatter"; - private static final String FORMATTER_CLASS = "com.diffplug.spotless.extra.eclipse.cdt.EclipseCdtFormatterStepImpl"; - private static final String FORMATTER_METHOD = "format"; - private static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(8, "4.16.0").add(11, "4.21.0"); + private static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(11, "10.7").add(17, "11.0"); public static String defaultVersion() { return JVM_SUPPORT.getRecommendedFormatterVersion(); } /** Provides default configuration */ - public static EclipseBasedStepBuilder createBuilder(Provisioner provisioner) { - return new EclipseBasedStepBuilder(NAME, provisioner, EclipseCdtFormatterStep::apply); + public static EquoBasedStepBuilder createBuilder(Provisioner provisioner) { + return new EquoBasedStepBuilder(NAME, provisioner, EclipseCdtFormatterStep::apply) { + @Override + protected P2Model model(String version) { + var model = new P2Model(); + addPlatformRepo(model, "4.26"); + model.addP2Repo("https://download.eclipse.org/tools/cdt/releases/" + version + "/"); + model.getInstall().add("org.eclipse.cdt.core"); + return model; + } + }; } - private static FormatterFunc apply(State state) throws Exception { + private static FormatterFunc apply(EquoBasedStepBuilder.State state) throws Exception { JVM_SUPPORT.assertFormatterSupported(state.getSemanticVersion()); - Class formatterClazz = state.loadClass(FORMATTER_CLASS); - Object formatter = formatterClazz.getConstructor(Properties.class).newInstance(state.getPreferences()); - Method method = formatterClazz.getMethod(FORMATTER_METHOD, String.class); - return JVM_SUPPORT.suggestLaterVersionOnError(state.getSemanticVersion(), input -> (String) method.invoke(formatter, input)); + Class formatterClazz = state.getJarState().getClassLoader().loadClass("com.diffplug.spotless.extra.glue.cdt.EclipseCdtFormatterStepImpl"); + var formatter = formatterClazz.getConstructor(Properties.class).newInstance(state.getPreferences()); + var method = formatterClazz.getMethod("format", String.class); + return JVM_SUPPORT.suggestLaterVersionOnError(state.getSemanticVersion(), + input -> { + try { + return (String) method.invoke(formatter, input); + } catch (InvocationTargetException exceptionWrapper) { + Throwable throwable = exceptionWrapper.getTargetException(); + Exception exception = (throwable instanceof Exception) ? (Exception) throwable : null; + throw (null == exception) ? exceptionWrapper : exception; + } + }); } - } diff --git a/lib-extra/src/main/java/com/diffplug/spotless/extra/groovy/GrEclipseFormatterStep.java b/lib-extra/src/main/java/com/diffplug/spotless/extra/groovy/GrEclipseFormatterStep.java index 013f5b5c2c..08c28889f9 100644 --- a/lib-extra/src/main/java/com/diffplug/spotless/extra/groovy/GrEclipseFormatterStep.java +++ b/lib-extra/src/main/java/com/diffplug/spotless/extra/groovy/GrEclipseFormatterStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,14 +16,15 @@ package com.diffplug.spotless.extra.groovy; import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; +import java.util.List; import java.util.Properties; import com.diffplug.spotless.FormatterFunc; import com.diffplug.spotless.Jvm; import com.diffplug.spotless.Provisioner; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder.State; +import com.diffplug.spotless.extra.EquoBasedStepBuilder; + +import dev.equo.solstice.p2.P2Model; /** Formatter step which calls out to the Groovy-Eclipse formatter. */ public final class GrEclipseFormatterStep { @@ -31,26 +32,60 @@ public final class GrEclipseFormatterStep { private GrEclipseFormatterStep() {} private static final String NAME = "eclipse groovy formatter"; - private static final String FORMATTER_CLASS = "com.diffplug.spotless.extra.eclipse.groovy.GrEclipseFormatterStepImpl"; - private static final String FORMATTER_CLASS_OLD = "com.diffplug.gradle.spotless.groovy.eclipse.GrEclipseFormatterStepImpl"; - private static final String MAVEN_GROUP_ARTIFACT = "com.diffplug.spotless:spotless-eclipse-groovy"; - private static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(8, "4.19.0").add(11, "4.21.0"); - private static final String FORMATTER_METHOD = "format"; + private static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(11, "4.26"); public static String defaultVersion() { return JVM_SUPPORT.getRecommendedFormatterVersion(); } - /** Provides default configuration */ - public static EclipseBasedStepBuilder createBuilder(Provisioner provisioner) { - return new EclipseBasedStepBuilder(NAME, provisioner, GrEclipseFormatterStep::apply); + public static EquoBasedStepBuilder createBuilder(Provisioner provisioner) { + return new EquoBasedStepBuilder(NAME, provisioner, GrEclipseFormatterStep::apply) { + @Override + protected P2Model model(String version) { + if (!version.startsWith("4.")) { + throw new IllegalArgumentException("Expected version 4.x"); + } + int eVersion = Integer.parseInt(version.substring("4.".length())); + if (eVersion < 8) { + throw new IllegalArgumentException("4.8 is the oldest version we support, this was " + version); + } + String greclipseVersion; + if (eVersion >= 18) { + greclipseVersion = "4." + (eVersion - 18) + ".0"; + } else { + greclipseVersion = "3." + (eVersion - 8) + ".0"; + } + var model = new P2Model(); + addPlatformRepo(model, version); + model.addP2Repo("https://groovy.jfrog.io/artifactory/plugins-release/org/codehaus/groovy/groovy-eclipse-integration/" + greclipseVersion + "/e" + version + "/"); + model.getInstall().addAll(List.of( + "org.codehaus.groovy.eclipse.refactoring", + "org.codehaus.groovy.eclipse.core", + "org.eclipse.jdt.groovy.core", + "org.codehaus.groovy")); + model.addFilterAndValidate("no-debug", filter -> { + filter.exclude("org.eclipse.jdt.debug"); + }); + return model; + } + + @Override + public void setVersion(String version) { + if (version.endsWith(".0")) { + String newVersion = version.substring(0, version.length() - 2); + System.err.println("Recommend replacing '" + version + "' with '" + newVersion + "' for eclipse JDT"); + version = newVersion; + } + super.setVersion(version); + } + }; } - private static FormatterFunc apply(EclipseBasedStepBuilder.State state) throws Exception { + private static FormatterFunc apply(EquoBasedStepBuilder.State state) throws Exception { JVM_SUPPORT.assertFormatterSupported(state.getSemanticVersion()); - Class formatterClazz = getClass(state); - Object formatter = formatterClazz.getConstructor(Properties.class).newInstance(state.getPreferences()); - Method method = formatterClazz.getMethod(FORMATTER_METHOD, String.class); + Class formatterClazz = state.getJarState().getClassLoader().loadClass("com.diffplug.spotless.extra.glue.groovy.GrEclipseFormatterStepImpl"); + var formatter = formatterClazz.getConstructor(Properties.class).newInstance(state.getPreferences()); + var method = formatterClazz.getMethod("format", String.class); return JVM_SUPPORT.suggestLaterVersionOnError(state.getSemanticVersion(), input -> { try { @@ -62,12 +97,4 @@ private static FormatterFunc apply(EclipseBasedStepBuilder.State state) throws E } }); } - - private static Class getClass(State state) { - if (state.getMavenCoordinate(MAVEN_GROUP_ARTIFACT).isPresent()) { - return state.loadClass(FORMATTER_CLASS); - } - return state.loadClass(FORMATTER_CLASS_OLD); - } - } diff --git a/lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStep.java b/lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStep.java index d0d42f2814..cd9314406f 100644 --- a/lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStep.java +++ b/lib-extra/src/main/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,14 +16,14 @@ package com.diffplug.spotless.extra.java; import java.io.File; -import java.lang.reflect.Method; import java.util.Properties; import com.diffplug.spotless.FormatterFunc; import com.diffplug.spotless.Jvm; import com.diffplug.spotless.Provisioner; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder.State; +import com.diffplug.spotless.extra.EquoBasedStepBuilder; + +import dev.equo.solstice.p2.P2Model; /** Formatter step which calls out to the Eclipse JDT formatter. */ public final class EclipseJdtFormatterStep { @@ -31,43 +31,40 @@ public final class EclipseJdtFormatterStep { private EclipseJdtFormatterStep() {} private static final String NAME = "eclipse jdt formatter"; - private static final String FORMATTER_CLASS_OLD = "com.diffplug.gradle.spotless.java.eclipse.EclipseFormatterStepImpl"; - private static final String FORMATTER_CLASS = "com.diffplug.spotless.extra.eclipse.java.EclipseJdtFormatterStepImpl"; - private static final String MAVEN_GROUP_ARTIFACT = "com.diffplug.spotless:spotless-eclipse-jdt"; - private static final String FORMATTER_METHOD = "format"; - private static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(8, "4.19.0").add(11, "4.21.0"); + private static final Jvm.Support JVM_SUPPORT = Jvm. support(NAME).add(11, "4.26"); public static String defaultVersion() { return JVM_SUPPORT.getRecommendedFormatterVersion(); } - /** Provides default configuration */ - public static EclipseBasedStepBuilder createBuilder(Provisioner provisioner) { - return new EclipseBasedStepBuilder(NAME, provisioner, EclipseJdtFormatterStep::apply); + public static EquoBasedStepBuilder createBuilder(Provisioner provisioner) { + return new EquoBasedStepBuilder(NAME, provisioner, EclipseJdtFormatterStep::apply) { + @Override + protected P2Model model(String version) { + var model = new P2Model(); + addPlatformRepo(model, version); + model.getInstall().add("org.eclipse.jdt.core"); + return model; + } + + @Override + public void setVersion(String version) { + if (version.endsWith(".0")) { + String newVersion = version.substring(0, version.length() - 2); + System.err.println("Recommend replacing '" + version + "' with '" + newVersion + "' for Eclipse JDT"); + version = newVersion; + } + super.setVersion(version); + } + }; } - private static FormatterFunc apply(State state) throws Exception { + private static FormatterFunc apply(EquoBasedStepBuilder.State state) throws Exception { JVM_SUPPORT.assertFormatterSupported(state.getSemanticVersion()); - Class formatterClazz = getClass(state); - Object formatter = formatterClazz.getConstructor(Properties.class).newInstance(state.getPreferences()); - FormatterFunc formatterFunc = getFormatterFunc(formatter, formatterClazz); + Class formatterClazz = state.getJarState().getClassLoader().loadClass("com.diffplug.spotless.extra.glue.jdt.EclipseJdtFormatterStepImpl"); + var formatter = formatterClazz.getConstructor(Properties.class).newInstance(state.getPreferences()); + var method = formatterClazz.getMethod("format", String.class, File.class); + FormatterFunc formatterFunc = (FormatterFunc.NeedsFile) (input, file) -> (String) method.invoke(formatter, input, file); return JVM_SUPPORT.suggestLaterVersionOnError(state.getSemanticVersion(), formatterFunc); } - - private static Class getClass(State state) { - if (state.getMavenCoordinate(MAVEN_GROUP_ARTIFACT).isPresent()) { - return state.loadClass(FORMATTER_CLASS); - } - return state.loadClass(FORMATTER_CLASS_OLD); - } - - private static FormatterFunc getFormatterFunc(Object formatter, Class formatterClazz) throws NoSuchMethodException, SecurityException { - try { - Method method = formatterClazz.getMethod(FORMATTER_METHOD, String.class, File.class); - return (FormatterFunc.NeedsFile) (input, file) -> (String) method.invoke(formatter, input, file); - } catch (NoSuchMethodException e) { - Method method = formatterClazz.getMethod(FORMATTER_METHOD, String.class); - return input -> (String) method.invoke(formatter, input); - } - } } diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.11.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.11.0.lockfile deleted file mode 100644 index 7cad5634fe..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.11.0.lockfile +++ /dev/null @@ -1,21 +0,0 @@ -# Spotless formatter based on CDT version 9.7.0 (see https://www.eclipse.org/cdt/) -com.diffplug.spotless:spotless-eclipse-cdt:9.7.0 -com.diffplug.spotless:spotless-eclipse-base:3.1.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -com.ibm.icu:icu4j:61.1 -org.eclipse.platform:org.eclipse.core.commands:3.9.300 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.300 -org.eclipse.platform:org.eclipse.core.filebuffers:3.6.500 -org.eclipse.platform:org.eclipse.core.filesystem:1.7.300 -org.eclipse.platform:org.eclipse.core.jobs:3.10.300 -org.eclipse.platform:org.eclipse.core.resources:3.13.300 -org.eclipse.platform:org.eclipse.core.runtime:3.15.200 -org.eclipse.platform:org.eclipse.equinox.app:1.4.100 -org.eclipse.platform:org.eclipse.equinox.common:3.10.300 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.300 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.300 -org.eclipse.platform:org.eclipse.jface.text:3.15.100 -org.eclipse.platform:org.eclipse.jface:3.15.100 -org.eclipse.platform:org.eclipse.osgi:3.13.300 -org.eclipse.platform:org.eclipse.text:3.8.100 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.12.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.12.0.lockfile deleted file mode 100644 index 6fd639528a..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.12.0.lockfile +++ /dev/null @@ -1,21 +0,0 @@ -# Spotless formatter based on CDT version 9.8.0 (see https://www.eclipse.org/cdt/) -com.diffplug.spotless:spotless-eclipse-cdt:9.8.1 -com.diffplug.spotless:spotless-eclipse-base:3.2.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -com.ibm.icu:icu4j:61.2 -org.eclipse.platform:org.eclipse.core.commands:3.9.400 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.300 -org.eclipse.platform:org.eclipse.core.filebuffers:3.6.600 -org.eclipse.platform:org.eclipse.core.filesystem:1.7.400 -org.eclipse.platform:org.eclipse.core.jobs:3.10.400 -org.eclipse.platform:org.eclipse.core.resources:3.13.400 -org.eclipse.platform:org.eclipse.core.runtime:3.15.300 -org.eclipse.platform:org.eclipse.equinox.app:1.4.200 -org.eclipse.platform:org.eclipse.equinox.common:3.10.400 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.400 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.400 -org.eclipse.platform:org.eclipse.jface.text:3.15.200 -org.eclipse.platform:org.eclipse.jface:3.16.0 -org.eclipse.platform:org.eclipse.osgi:3.14.0 -org.eclipse.platform:org.eclipse.text:3.8.200 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.13.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.13.0.lockfile deleted file mode 100644 index 1d169ff087..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.13.0.lockfile +++ /dev/null @@ -1,21 +0,0 @@ -# Spotless formatter based on CDT version 9.9.0 (see https://www.eclipse.org/cdt/) -com.diffplug.spotless:spotless-eclipse-cdt:9.9.0 -com.diffplug.spotless:spotless-eclipse-base:3.2.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -com.ibm.icu:icu4j:61.2 -org.eclipse.platform:org.eclipse.core.commands:3.9.500 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.400 -org.eclipse.platform:org.eclipse.core.filebuffers:3.6.700 -org.eclipse.platform:org.eclipse.core.filesystem:1.7.500 -org.eclipse.platform:org.eclipse.core.jobs:3.10.500 -org.eclipse.platform:org.eclipse.core.resources:3.13.500 -org.eclipse.platform:org.eclipse.core.runtime:3.16.0 -org.eclipse.platform:org.eclipse.equinox.app:1.4.300 -org.eclipse.platform:org.eclipse.equinox.common:3.10.500 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.500 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.500 -org.eclipse.platform:org.eclipse.jface.text:3.15.300 -org.eclipse.platform:org.eclipse.jface:3.17.0 -org.eclipse.platform:org.eclipse.osgi:3.15.0 -org.eclipse.platform:org.eclipse.text:3.9.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.14.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.14.0.lockfile deleted file mode 100644 index 43cb98774d..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.14.0.lockfile +++ /dev/null @@ -1,22 +0,0 @@ -# Spotless formatter based on CDT version 9.10.0 (see https://www.eclipse.org/cdt/) -com.diffplug.spotless:spotless-eclipse-cdt:9.10.0 -com.diffplug.spotless:spotless-eclipse-base:3.3.0 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -com.ibm.icu:icu4j:64.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.600 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.500 -org.eclipse.platform:org.eclipse.core.filebuffers:3.6.800 -org.eclipse.platform:org.eclipse.core.filesystem:1.7.600 -org.eclipse.platform:org.eclipse.core.jobs:3.10.600 -org.eclipse.platform:org.eclipse.core.resources:3.13.600 -org.eclipse.platform:org.eclipse.core.runtime:3.17.0 -org.eclipse.platform:org.eclipse.equinox.app:1.4.300 -org.eclipse.platform:org.eclipse.equinox.common:3.10.600 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.600 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.600 -org.eclipse.platform:org.eclipse.jface.text:3.16.100 -org.eclipse.platform:org.eclipse.jface:3.18.0 -org.eclipse.platform:org.eclipse.osgi:3.15.100 -org.eclipse.platform:org.eclipse.text:3.10.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.16.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.16.0.lockfile deleted file mode 100644 index 3bf6b1ca01..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.16.0.lockfile +++ /dev/null @@ -1,22 +0,0 @@ -# Spotless formatter based on CDT version 9.11.1 (see https://www.eclipse.org/cdt/) -com.diffplug.spotless:spotless-eclipse-cdt:9.11.0 -com.diffplug.spotless:spotless-eclipse-base:3.3.0 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -com.google.j2objc:j2objc-annotations:1.3 -com.ibm.icu:icu4j:64.2 -org.eclipse.platform:org.eclipse.core.commands:3.9.700 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.700 -org.eclipse.platform:org.eclipse.core.filebuffers:3.6.1000 -org.eclipse.platform:org.eclipse.core.filesystem:1.7.700 -org.eclipse.platform:org.eclipse.core.jobs:3.10.800 -org.eclipse.platform:org.eclipse.core.resources:3.13.700 -org.eclipse.platform:org.eclipse.core.runtime:3.18.0 -org.eclipse.platform:org.eclipse.equinox.app:1.4.500 -org.eclipse.platform:org.eclipse.equinox.common:3.12.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.0 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.800 -org.eclipse.platform:org.eclipse.jface.text:3.16.300 -org.eclipse.platform:org.eclipse.jface:3.20.0 -org.eclipse.platform:org.eclipse.osgi:3.15.300 -org.eclipse.platform:org.eclipse.text:3.10.200 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.17.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.17.0.lockfile deleted file mode 100644 index 78a6db147f..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.17.0.lockfile +++ /dev/null @@ -1,22 +0,0 @@ -# Spotless formatter based on CDT version 10.0 (see https://www.eclipse.org/cdt/) -com.diffplug.spotless:spotless-eclipse-cdt:10.0.0 -com.diffplug.spotless:spotless-eclipse-base:3.4.1 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -com.ibm.icu:icu4j:64.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.700 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.800 -org.eclipse.platform:org.eclipse.core.filebuffers:3.6.1000 -org.eclipse.platform:org.eclipse.core.filesystem:1.7.700 -org.eclipse.platform:org.eclipse.core.jobs:3.10.800 -org.eclipse.platform:org.eclipse.core.resources:3.13.800 -org.eclipse.platform:org.eclipse.core.runtime:3.19.0 -org.eclipse.platform:org.eclipse.equinox.app:1.5.0 -org.eclipse.platform:org.eclipse.equinox.common:3.13.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.0 -org.eclipse.platform:org.eclipse.equinox.registry:3.9.0 -org.eclipse.platform:org.eclipse.jface.text:3.16.400 -org.eclipse.platform:org.eclipse.jface:3.21.0 -org.eclipse.platform:org.eclipse.osgi:3.16.0 -org.eclipse.platform:org.eclipse.text:3.10.300 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.18.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.18.0.lockfile deleted file mode 100644 index 7135a6826d..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.18.0.lockfile +++ /dev/null @@ -1,22 +0,0 @@ -# Spotless formatter based on CDT version 10.1 (see https://www.eclipse.org/cdt/) -com.diffplug.spotless:spotless-eclipse-cdt:10.1.0 -com.diffplug.spotless:spotless-eclipse-base:3.4.2 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -com.ibm.icu:icu4j:64.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.800 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.800 -org.eclipse.platform:org.eclipse.core.filebuffers:3.6.1100 -org.eclipse.platform:org.eclipse.core.filesystem:1.7.700 -org.eclipse.platform:org.eclipse.core.jobs:3.10.1000 -org.eclipse.platform:org.eclipse.core.resources:3.13.900 -org.eclipse.platform:org.eclipse.core.runtime:3.20.0 -org.eclipse.platform:org.eclipse.equinox.app:1.5.0 -org.eclipse.platform:org.eclipse.equinox.common:3.14.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.100 -org.eclipse.platform:org.eclipse.equinox.registry:3.10.0 -org.eclipse.platform:org.eclipse.jface.text:3.16.500 -org.eclipse.platform:org.eclipse.jface:3.22.0 -org.eclipse.platform:org.eclipse.osgi:3.16.100 -org.eclipse.platform:org.eclipse.text:3.10.400 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.19.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.19.0.lockfile deleted file mode 100644 index 7c508e64bd..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.19.0.lockfile +++ /dev/null @@ -1,22 +0,0 @@ -# Spotless formatter based on CDT version 10.2 (see https://www.eclipse.org/cdt/) -com.diffplug.spotless:spotless-eclipse-cdt:10.2.0 -com.diffplug.spotless:spotless-eclipse-base:3.4.2 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -com.ibm.icu:icu4j:67.1 -net.jcip:jcip-annotations:1.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.800 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.900 -org.eclipse.platform:org.eclipse.core.filebuffers:3.6.1100 -org.eclipse.platform:org.eclipse.core.filesystem:1.7.700 -org.eclipse.platform:org.eclipse.core.jobs:3.10.1100 -org.eclipse.platform:org.eclipse.core.resources:3.14.0 -org.eclipse.platform:org.eclipse.core.runtime:3.20.100 -org.eclipse.platform:org.eclipse.equinox.app:1.5.100 -org.eclipse.platform:org.eclipse.equinox.common:3.14.100 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.200 -org.eclipse.platform:org.eclipse.equinox.registry:3.10.100 -org.eclipse.platform:org.eclipse.jface.text:3.17.0 -org.eclipse.platform:org.eclipse.jface:3.22.100 -org.eclipse.platform:org.eclipse.osgi:3.16.200 -org.eclipse.platform:org.eclipse.text:3.11.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.20.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.20.0.lockfile deleted file mode 100644 index 6cdb507d00..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.20.0.lockfile +++ /dev/null @@ -1,22 +0,0 @@ -# Spotless formatter based on CDT version 10.3 (see https://www.eclipse.org/cdt/) -com.diffplug.spotless:spotless-eclipse-cdt:10.3.0 -com.diffplug.spotless:spotless-eclipse-base:3.5.2 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -com.ibm.icu:icu4j:67.1 -net.jcip:jcip-annotations:1.0 -org.eclipse.platform:org.eclipse.core.commands:3.10.0 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.1000 -org.eclipse.platform:org.eclipse.core.filebuffers:3.7.0 -org.eclipse.platform:org.eclipse.core.filesystem:1.9.0 -org.eclipse.platform:org.eclipse.core.jobs:3.11.0 -org.eclipse.platform:org.eclipse.core.resources:3.15.0 -org.eclipse.platform:org.eclipse.core.runtime:3.22.0 -org.eclipse.platform:org.eclipse.equinox.app:1.5.100 -org.eclipse.platform:org.eclipse.equinox.common:3.15.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.200 -org.eclipse.platform:org.eclipse.equinox.registry:3.10.200 -org.eclipse.platform:org.eclipse.jface.text:3.18.0 -org.eclipse.platform:org.eclipse.jface:3.22.200 -org.eclipse.platform:org.eclipse.osgi:3.16.300 -org.eclipse.platform:org.eclipse.text:3.12.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.21.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.21.0.lockfile deleted file mode 100644 index 4acd5a98ca..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.21.0.lockfile +++ /dev/null @@ -1,22 +0,0 @@ -# Spotless formatter based on CDT version 10.4 (see https://www.eclipse.org/cdt/) -com.diffplug.spotless:spotless-eclipse-cdt:10.4.0 -com.diffplug.spotless:spotless-eclipse-base:3.5.2 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -com.ibm.icu:icu4j:67.1 -net.jcip:jcip-annotations:1.0 -org.eclipse.platform:org.eclipse.core.commands:3.10.100 -org.eclipse.platform:org.eclipse.core.contenttype:3.8.0 -org.eclipse.platform:org.eclipse.core.filebuffers:3.7.0 -org.eclipse.platform:org.eclipse.core.filesystem:1.9.100 -org.eclipse.platform:org.eclipse.core.jobs:3.12.0 -org.eclipse.platform:org.eclipse.core.resources:3.15.100 -org.eclipse.platform:org.eclipse.core.runtime:3.23.0 -org.eclipse.platform:org.eclipse.equinox.app:1.6.0 -org.eclipse.platform:org.eclipse.equinox.common:3.15.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.9.0 -org.eclipse.platform:org.eclipse.equinox.registry:3.11.0 -org.eclipse.platform:org.eclipse.jface.text:3.18.100 -org.eclipse.platform:org.eclipse.jface:3.23.0 -org.eclipse.platform:org.eclipse.osgi:3.17.0 -org.eclipse.platform:org.eclipse.text:3.12.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.7.3a.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.7.3a.lockfile deleted file mode 100644 index 92a0d32cc7..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_cdt_formatter/v4.7.3a.lockfile +++ /dev/null @@ -1,21 +0,0 @@ -# Spotless formatter based on CDT version 9.4.3 (see https://www.eclipse.org/cdt/) -com.diffplug.spotless:spotless-eclipse-cdt:9.4.5 -com.diffplug.spotless:spotless-eclipse-base:3.1.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -com.ibm.icu:icu4j:61.1 -org.eclipse.platform:org.eclipse.core.commands:3.9.100 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.0 -org.eclipse.platform:org.eclipse.core.filebuffers:3.6.200 -org.eclipse.platform:org.eclipse.core.filesystem:1.7.100 -org.eclipse.platform:org.eclipse.core.jobs:3.10.0 -org.eclipse.platform:org.eclipse.core.resources:3.13.0 -org.eclipse.platform:org.eclipse.core.runtime:3.14.0 -org.eclipse.platform:org.eclipse.equinox.app:1.3.500 -org.eclipse.platform:org.eclipse.equinox.common:3.10.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.100 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.0 -org.eclipse.platform:org.eclipse.jface.text:3.13.0 -org.eclipse.platform:org.eclipse.jface:3.14.0 -org.eclipse.platform:org.eclipse.osgi:3.13.0 -org.eclipse.platform:org.eclipse.text:3.6.300 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v2.3.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v2.3.0.lockfile deleted file mode 100644 index 878ddbe76a..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v2.3.0.lockfile +++ /dev/null @@ -1,5 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 2.3.0 (see https://github.com/groovy/groovy-eclipse/wiki) -# -# This version is deprecated since the new version system is based on the Eclipse versioning. -# Use the corresponding Eclipse version 4.6.3 instead. -com.diffplug.spotless:spotless-ext-greclipse:2.3.0 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.10.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.10.0.lockfile deleted file mode 100644 index 33f672b306..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.10.0.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 3.0.0 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:3.2.0 -com.diffplug.spotless:spotless-eclipse-base:3.1.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.300 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.300 -org.eclipse.platform:org.eclipse.core.jobs:3.10.300 -org.eclipse.platform:org.eclipse.core.resources:3.13.300 -org.eclipse.platform:org.eclipse.core.runtime:3.15.200 -org.eclipse.platform:org.eclipse.equinox.app:1.4.100 -org.eclipse.platform:org.eclipse.equinox.common:3.10.300 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.300 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.300 -org.eclipse.platform:org.eclipse.jface.text:3.15.100 -org.eclipse.platform:org.eclipse.jface:3.15.100 -org.eclipse.platform:org.eclipse.osgi:3.13.300 -org.eclipse.platform:org.eclipse.text:3.8.100 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.12.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.12.0.lockfile deleted file mode 100644 index a60e5e8fb0..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.12.0.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 3.4.0 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:3.4.0 -com.diffplug.spotless:spotless-eclipse-base:3.2.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.400 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.300 -org.eclipse.platform:org.eclipse.core.jobs:3.10.400 -org.eclipse.platform:org.eclipse.core.resources:3.13.400 -org.eclipse.platform:org.eclipse.core.runtime:3.15.300 -org.eclipse.platform:org.eclipse.equinox.app:1.4.200 -org.eclipse.platform:org.eclipse.equinox.common:3.10.400 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.400 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.400 -org.eclipse.platform:org.eclipse.jface.text:3.15.200 -org.eclipse.platform:org.eclipse.jface:3.16.0 -org.eclipse.platform:org.eclipse.osgi:3.14.0 -org.eclipse.platform:org.eclipse.text:3.8.200 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.13.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.13.0.lockfile deleted file mode 100644 index aede5b0a76..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.13.0.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 3.5.0 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:3.5.0 -com.diffplug.spotless:spotless-eclipse-base:3.2.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.500 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.400 -org.eclipse.platform:org.eclipse.core.jobs:3.10.500 -org.eclipse.platform:org.eclipse.core.resources:3.13.500 -org.eclipse.platform:org.eclipse.core.runtime:3.16.0 -org.eclipse.platform:org.eclipse.equinox.app:1.4.300 -org.eclipse.platform:org.eclipse.equinox.common:3.10.500 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.500 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.500 -org.eclipse.platform:org.eclipse.jface.text:3.15.300 -org.eclipse.platform:org.eclipse.jface:3.17.0 -org.eclipse.platform:org.eclipse.osgi:3.15.0 -org.eclipse.platform:org.eclipse.text:3.9.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.14.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.14.0.lockfile deleted file mode 100644 index bca432c337..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.14.0.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 3.6.0 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:3.6.0 -com.diffplug.spotless:spotless-eclipse-base:3.3.0 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -org.eclipse.platform:org.eclipse.core.commands:3.9.600 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.500 -org.eclipse.platform:org.eclipse.core.jobs:3.10.600 -org.eclipse.platform:org.eclipse.core.resources:3.13.600 -org.eclipse.platform:org.eclipse.core.runtime:3.17.0 -org.eclipse.platform:org.eclipse.equinox.app:1.4.300 -org.eclipse.platform:org.eclipse.equinox.common:3.10.600 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.600 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.600 -org.eclipse.platform:org.eclipse.jface.text:3.16.100 -org.eclipse.platform:org.eclipse.jface:3.18.0 -org.eclipse.platform:org.eclipse.osgi:3.15.100 -org.eclipse.platform:org.eclipse.text:3.10.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.15.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.15.0.lockfile deleted file mode 100644 index fc91fae066..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.15.0.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 3.7.0 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:3.7.0 -com.diffplug.spotless:spotless-eclipse-base:3.3.0 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -org.eclipse.platform:org.eclipse.core.commands:3.9.700 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.600 -org.eclipse.platform:org.eclipse.core.jobs:3.10.700 -org.eclipse.platform:org.eclipse.core.resources:3.13.700 -org.eclipse.platform:org.eclipse.core.runtime:3.17.100 -org.eclipse.platform:org.eclipse.equinox.app:1.4.400 -org.eclipse.platform:org.eclipse.equinox.common:3.11.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.700 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.700 -org.eclipse.platform:org.eclipse.jface.text:3.16.200 -org.eclipse.platform:org.eclipse.jface:3.19.0 -org.eclipse.platform:org.eclipse.osgi:3.15.200 -org.eclipse.platform:org.eclipse.text:3.10.100 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.16.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.16.0.lockfile deleted file mode 100644 index 2c5f4ccd03..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.16.0.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 3.8.0 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:3.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.3.0 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -org.eclipse.platform:org.eclipse.core.commands:3.9.700 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.700 -org.eclipse.platform:org.eclipse.core.jobs:3.10.800 -org.eclipse.platform:org.eclipse.core.resources:3.13.700 -org.eclipse.platform:org.eclipse.core.runtime:3.18.0 -org.eclipse.platform:org.eclipse.equinox.app:1.4.500 -org.eclipse.platform:org.eclipse.equinox.common:3.12.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.0 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.800 -org.eclipse.platform:org.eclipse.jface.text:3.16.300 -org.eclipse.platform:org.eclipse.jface:3.20.0 -org.eclipse.platform:org.eclipse.osgi:3.15.300 -org.eclipse.platform:org.eclipse.text:3.10.200 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.17.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.17.0.lockfile deleted file mode 100644 index 5242d0da8c..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.17.0.lockfile +++ /dev/null @@ -1,19 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 3.9.0 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:3.9.0 -com.diffplug.spotless:spotless-eclipse-base:3.4.1 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.700 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.800 -org.eclipse.platform:org.eclipse.core.jobs:3.10.800 -org.eclipse.platform:org.eclipse.core.resources:3.13.800 -org.eclipse.platform:org.eclipse.core.runtime:3.19.0 -org.eclipse.platform:org.eclipse.equinox.app:1.5.0 -org.eclipse.platform:org.eclipse.equinox.common:3.13.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.0 -org.eclipse.platform:org.eclipse.equinox.registry:3.9.0 -org.eclipse.platform:org.eclipse.jface.text:3.16.400 -org.eclipse.platform:org.eclipse.jface:3.21.0 -org.eclipse.platform:org.eclipse.osgi:3.16.0 -org.eclipse.platform:org.eclipse.text:3.10.300 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.18.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.18.0.lockfile deleted file mode 100644 index 6bfec53756..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.18.0.lockfile +++ /dev/null @@ -1,19 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 4.0.0 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:4.0.0 -com.diffplug.spotless:spotless-eclipse-base:3.4.2 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.800 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.800 -org.eclipse.platform:org.eclipse.core.jobs:3.10.1000 -org.eclipse.platform:org.eclipse.core.resources:3.13.900 -org.eclipse.platform:org.eclipse.core.runtime:3.20.0 -org.eclipse.platform:org.eclipse.equinox.app:1.5.0 -org.eclipse.platform:org.eclipse.equinox.common:3.14.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.100 -org.eclipse.platform:org.eclipse.equinox.registry:3.10.0 -org.eclipse.platform:org.eclipse.jface.text:3.16.500 -org.eclipse.platform:org.eclipse.jface:3.22.0 -org.eclipse.platform:org.eclipse.osgi:3.16.100 -org.eclipse.platform:org.eclipse.text:3.10.400 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.19.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.19.0.lockfile deleted file mode 100644 index 880d55ac8d..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.19.0.lockfile +++ /dev/null @@ -1,19 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 4.1.0 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:4.1.0 -com.diffplug.spotless:spotless-eclipse-base:3.4.2 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.800 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.900 -org.eclipse.platform:org.eclipse.core.jobs:3.10.1100 -org.eclipse.platform:org.eclipse.core.resources:3.14.0 -org.eclipse.platform:org.eclipse.core.runtime:3.20.100 -org.eclipse.platform:org.eclipse.equinox.app:1.5.100 -org.eclipse.platform:org.eclipse.equinox.common:3.14.100 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.200 -org.eclipse.platform:org.eclipse.equinox.registry:3.10.100 -org.eclipse.platform:org.eclipse.jface.text:3.17.0 -org.eclipse.platform:org.eclipse.jface:3.22.100 -org.eclipse.platform:org.eclipse.osgi:3.16.200 -org.eclipse.platform:org.eclipse.text:3.11.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.20.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.20.0.lockfile deleted file mode 100644 index 2836c05982..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.20.0.lockfile +++ /dev/null @@ -1,20 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 4.2.0 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:4.2.0 -com.diffplug.spotless:spotless-eclipse-base:3.5.2 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.platform:org.eclipse.core.commands:3.10.0 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.1000 -org.eclipse.platform:org.eclipse.core.filesystem:1.9.0 -org.eclipse.platform:org.eclipse.core.jobs:3.11.0 -org.eclipse.platform:org.eclipse.core.resources:3.15.0 -org.eclipse.platform:org.eclipse.core.runtime:3.22.0 -org.eclipse.platform:org.eclipse.equinox.app:1.5.100 -org.eclipse.platform:org.eclipse.equinox.common:3.15.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.200 -org.eclipse.platform:org.eclipse.equinox.registry:3.10.200 -org.eclipse.platform:org.eclipse.jface.text:3.18.0 -org.eclipse.platform:org.eclipse.jface:3.22.200 -org.eclipse.platform:org.eclipse.osgi:3.16.300 -org.eclipse.platform:org.eclipse.text:3.12.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.21.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.21.0.lockfile deleted file mode 100644 index 38376d1b32..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.21.0.lockfile +++ /dev/null @@ -1,20 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 4.3.0 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:4.3.0 -com.diffplug.spotless:spotless-eclipse-base:3.5.2 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.platform:org.eclipse.core.commands:3.10.100 -org.eclipse.platform:org.eclipse.core.contenttype:3.8.0 -org.eclipse.platform:org.eclipse.core.filesystem:1.9.100 -org.eclipse.platform:org.eclipse.core.jobs:3.12.0 -org.eclipse.platform:org.eclipse.core.resources:3.15.100 -org.eclipse.platform:org.eclipse.core.runtime:3.23.0 -org.eclipse.platform:org.eclipse.equinox.app:1.6.0 -org.eclipse.platform:org.eclipse.equinox.common:3.15.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.9.0 -org.eclipse.platform:org.eclipse.equinox.registry:3.11.0 -org.eclipse.platform:org.eclipse.jface.text:3.18.100 -org.eclipse.platform:org.eclipse.jface:3.23.0 -org.eclipse.platform:org.eclipse.osgi:3.17.0 -org.eclipse.platform:org.eclipse.text:3.12.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.6.3.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.6.3.lockfile deleted file mode 100644 index a6299ec57d..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.6.3.lockfile +++ /dev/null @@ -1,2 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 2.3.0 (see https://github.com/groovy/groovy-eclipse/wiki) -com.diffplug.spotless:spotless-ext-greclipse:2.3.0 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.8.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.8.0.lockfile deleted file mode 100644 index bb95c71104..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.8.0.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 2.9.2 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:2.9.2 -com.diffplug.spotless:spotless-eclipse-base:3.1.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.100 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.0 -org.eclipse.platform:org.eclipse.core.jobs:3.10.0 -org.eclipse.platform:org.eclipse.core.resources:3.13.0 -org.eclipse.platform:org.eclipse.core.runtime:3.14.0 -org.eclipse.platform:org.eclipse.equinox.app:1.3.500 -org.eclipse.platform:org.eclipse.equinox.common:3.10.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.100 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.0 -org.eclipse.platform:org.eclipse.jface.text:3.13.0 -org.eclipse.platform:org.eclipse.jface:3.14.0 -org.eclipse.platform:org.eclipse.osgi:3.13.0 -org.eclipse.platform:org.eclipse.text:3.6.300 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.8.1.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.8.1.lockfile deleted file mode 100644 index 9198eaccb9..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_groovy_formatter/v4.8.1.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on Groovy-Eclipse version 3.0.0 (see https://github.com/groovy/groovy-eclipse/releases) -com.diffplug.spotless:spotless-eclipse-groovy:3.0.1 -com.diffplug.spotless:spotless-eclipse-base:3.1.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.100 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.0 -org.eclipse.platform:org.eclipse.core.jobs:3.10.0 -org.eclipse.platform:org.eclipse.core.resources:3.13.0 -org.eclipse.platform:org.eclipse.core.runtime:3.14.0 -org.eclipse.platform:org.eclipse.equinox.app:1.3.500 -org.eclipse.platform:org.eclipse.equinox.common:3.10.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.100 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.0 -org.eclipse.platform:org.eclipse.jface.text:3.13.0 -org.eclipse.platform:org.eclipse.jface:3.14.0 -org.eclipse.platform:org.eclipse.osgi:3.13.0 -org.eclipse.platform:org.eclipse.text:3.6.300 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.10.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.10.0.lockfile deleted file mode 100644 index 42d81d7324..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.10.0.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on JDT version 4.10.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/tag/?h=R4_10 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.1.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.16.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.100 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.0 -org.eclipse.platform:org.eclipse.core.jobs:3.10.0 -org.eclipse.platform:org.eclipse.core.resources:3.13.0 -org.eclipse.platform:org.eclipse.core.runtime:3.14.0 -org.eclipse.platform:org.eclipse.equinox.app:1.3.500 -org.eclipse.platform:org.eclipse.equinox.common:3.10.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.100 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.0 -org.eclipse.platform:org.eclipse.osgi:3.13.0 -org.eclipse.platform:org.eclipse.text:3.6.300 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.11.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.11.0.lockfile deleted file mode 100644 index 3bbf59db23..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.11.0.lockfile +++ /dev/null @@ -1,19 +0,0 @@ -# Spotless formatter based on JDT version 4.11.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/tag/?h=R4_11 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.1.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.17.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.100 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.0 -org.eclipse.platform:org.eclipse.core.jobs:3.10.0 -org.eclipse.platform:org.eclipse.core.resources:3.13.0 -org.eclipse.platform:org.eclipse.core.runtime:3.14.0 -org.eclipse.platform:org.eclipse.equinox.app:1.3.500 -org.eclipse.platform:org.eclipse.equinox.common:3.10.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.100 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.0 -org.eclipse.platform:org.eclipse.osgi:3.13.0 -org.eclipse.platform:org.eclipse.text:3.6.300 - diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.12.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.12.0.lockfile deleted file mode 100644 index c9bfc9a57d..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.12.0.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on JDT version 4.12.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/tag/?h=R4_12 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.2.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.18.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.400 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.300 -org.eclipse.platform:org.eclipse.core.jobs:3.10.400 -org.eclipse.platform:org.eclipse.core.resources:3.13.400 -org.eclipse.platform:org.eclipse.core.runtime:3.15.300 -org.eclipse.platform:org.eclipse.equinox.app:1.4.200 -org.eclipse.platform:org.eclipse.equinox.common:3.10.400 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.400 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.400 -org.eclipse.platform:org.eclipse.osgi:3.14.0 -org.eclipse.platform:org.eclipse.text:3.8.200 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.13.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.13.0.lockfile deleted file mode 100644 index 4ee0adb3cf..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.13.0.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on JDT version 4.13.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/tag/?h=R4_13 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.2.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.19.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.500 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.400 -org.eclipse.platform:org.eclipse.core.jobs:3.10.500 -org.eclipse.platform:org.eclipse.core.resources:3.13.500 -org.eclipse.platform:org.eclipse.core.runtime:3.16.0 -org.eclipse.platform:org.eclipse.equinox.app:1.4.300 -org.eclipse.platform:org.eclipse.equinox.common:3.10.500 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.500 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.500 -org.eclipse.platform:org.eclipse.osgi:3.15.0 -org.eclipse.platform:org.eclipse.text:3.9.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.14.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.14.0.lockfile deleted file mode 100644 index b42352633a..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.14.0.lockfile +++ /dev/null @@ -1,19 +0,0 @@ -# Spotless formatter based on JDT version 4.14.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/log/?h=R4_14 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.3.0 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.20.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.600 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.500 -org.eclipse.platform:org.eclipse.core.jobs:3.10.600 -org.eclipse.platform:org.eclipse.core.resources:3.13.600 -org.eclipse.platform:org.eclipse.core.runtime:3.17.0 -org.eclipse.platform:org.eclipse.equinox.app:1.4.300 -org.eclipse.platform:org.eclipse.equinox.common:3.10.600 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.600 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.600 -org.eclipse.platform:org.eclipse.osgi:3.15.100 -org.eclipse.platform:org.eclipse.text:3.10.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.15.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.15.0.lockfile deleted file mode 100644 index ee21631962..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.15.0.lockfile +++ /dev/null @@ -1,19 +0,0 @@ -# Spotless formatter based on JDT version 4.15.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/log/?h=R4_15 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.3.0 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.21.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.700 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.600 -org.eclipse.platform:org.eclipse.core.jobs:3.10.700 -org.eclipse.platform:org.eclipse.core.resources:3.13.600 -org.eclipse.platform:org.eclipse.core.runtime:3.17.100 -org.eclipse.platform:org.eclipse.equinox.app:1.4.400 -org.eclipse.platform:org.eclipse.equinox.common:3.11.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.700 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.700 -org.eclipse.platform:org.eclipse.osgi:3.15.200 -org.eclipse.platform:org.eclipse.text:3.10.100 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.16.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.16.0.lockfile deleted file mode 100644 index 7ff27b440a..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.16.0.lockfile +++ /dev/null @@ -1,19 +0,0 @@ -# Spotless formatter based on JDT version 4.16.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/log/?h=R4_16 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.3.0 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.22.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.700 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.700 -org.eclipse.platform:org.eclipse.core.jobs:3.10.800 -org.eclipse.platform:org.eclipse.core.resources:3.13.700 -org.eclipse.platform:org.eclipse.core.runtime:3.18.0 -org.eclipse.platform:org.eclipse.equinox.app:1.4.500 -org.eclipse.platform:org.eclipse.equinox.common:3.12.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.0 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.800 -org.eclipse.platform:org.eclipse.osgi:3.15.300 -org.eclipse.platform:org.eclipse.text:3.10.200 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.17.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.17.0.lockfile deleted file mode 100644 index 47cb5f10dd..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.17.0.lockfile +++ /dev/null @@ -1,19 +0,0 @@ -# Spotless formatter based on JDT version 4.17.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/log/?h=R4_17 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.4.1 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.23.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.700 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.800 -org.eclipse.platform:org.eclipse.core.jobs:3.10.800 -org.eclipse.platform:org.eclipse.core.resources:3.13.800 -org.eclipse.platform:org.eclipse.core.runtime:3.19.0 -org.eclipse.platform:org.eclipse.equinox.app:1.5.0 -org.eclipse.platform:org.eclipse.equinox.common:3.13.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.0 -org.eclipse.platform:org.eclipse.equinox.registry:3.9.0 -org.eclipse.platform:org.eclipse.osgi:3.16.0 -org.eclipse.platform:org.eclipse.text:3.10.300 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.18.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.18.0.lockfile deleted file mode 100644 index c5b2799c11..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.18.0.lockfile +++ /dev/null @@ -1,19 +0,0 @@ -# Spotless formatter based on JDT version 4.18.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/log/?h=R4_18 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.4.2 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.24.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.800 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.800 -org.eclipse.platform:org.eclipse.core.jobs:3.10.1000 -org.eclipse.platform:org.eclipse.core.resources:3.13.900 -org.eclipse.platform:org.eclipse.core.runtime:3.20.0 -org.eclipse.platform:org.eclipse.equinox.app:1.5.0 -org.eclipse.platform:org.eclipse.equinox.common:3.14.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.100 -org.eclipse.platform:org.eclipse.equinox.registry:3.10.0 -org.eclipse.platform:org.eclipse.osgi:3.16.100 -org.eclipse.platform:org.eclipse.text:3.10.400 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.19.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.19.0.lockfile deleted file mode 100644 index fcc96b8520..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.19.0.lockfile +++ /dev/null @@ -1,19 +0,0 @@ -# Spotless formatter based on JDT version 4.19.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/log/?h=R4_19 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.4.2 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.25.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.800 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.900 -org.eclipse.platform:org.eclipse.core.jobs:3.10.1100 -org.eclipse.platform:org.eclipse.core.resources:3.14.0 -org.eclipse.platform:org.eclipse.core.runtime:3.20.100 -org.eclipse.platform:org.eclipse.equinox.app:1.5.100 -org.eclipse.platform:org.eclipse.equinox.common:3.14.100 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.200 -org.eclipse.platform:org.eclipse.equinox.registry:3.10.100 -org.eclipse.platform:org.eclipse.osgi:3.16.200 -org.eclipse.platform:org.eclipse.text:3.11.0 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.20.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.20.0.lockfile deleted file mode 100644 index b06a9bc617..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.20.0.lockfile +++ /dev/null @@ -1,20 +0,0 @@ -# Spotless formatter based on JDT version 4.20.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/log/?h=R4_20 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.1 -com.diffplug.spotless:spotless-eclipse-base:3.5.2 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.26.0 -org.eclipse.platform:org.eclipse.core.commands:3.10.0 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.1000 -org.eclipse.platform:org.eclipse.core.filesystem:1.9.0 -org.eclipse.platform:org.eclipse.core.jobs:3.11.0 -org.eclipse.platform:org.eclipse.core.resources:3.15.0 -org.eclipse.platform:org.eclipse.core.runtime:3.22.0 -org.eclipse.platform:org.eclipse.equinox.app:1.5.100 -org.eclipse.platform:org.eclipse.equinox.common:3.15.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.8.200 -org.eclipse.platform:org.eclipse.equinox.registry:3.10.200 -org.eclipse.platform:org.eclipse.osgi:3.16.300 -org.eclipse.platform:org.eclipse.text:3.12.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.21.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.21.0.lockfile deleted file mode 100644 index 84a90489c9..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.21.0.lockfile +++ /dev/null @@ -1,20 +0,0 @@ -# Spotless formatter based on JDT version 4.21.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/log/?h=R4_21 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.1 -com.diffplug.spotless:spotless-eclipse-base:3.5.2 -com.github.spotbugs:spotbugs-annotations:4.0.2 -com.google.code.findbugs:jsr305:3.0.2 -net.jcip:jcip-annotations:1.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.27.0 -org.eclipse.platform:org.eclipse.core.commands:3.10.100 -org.eclipse.platform:org.eclipse.core.contenttype:3.8.0 -org.eclipse.platform:org.eclipse.core.filesystem:1.9.100 -org.eclipse.platform:org.eclipse.core.jobs:3.12.0 -org.eclipse.platform:org.eclipse.core.resources:3.15.100 -org.eclipse.platform:org.eclipse.core.runtime:3.23.0 -org.eclipse.platform:org.eclipse.equinox.app:1.6.0 -org.eclipse.platform:org.eclipse.equinox.common:3.15.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.9.0 -org.eclipse.platform:org.eclipse.equinox.registry:3.11.0 -org.eclipse.platform:org.eclipse.osgi:3.17.0 -org.eclipse.platform:org.eclipse.text:3.12.0 diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.6.1.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.6.1.lockfile deleted file mode 100644 index fd408e7ecc..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.6.1.lockfile +++ /dev/null @@ -1,2 +0,0 @@ -# Spotless formatter based on JDT version 4.6.1 (see https://projects.eclipse.org/projects/eclipse.jdt) -com.diffplug.spotless:spotless-ext-eclipse-jdt:4.6.1 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.6.2.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.6.2.lockfile deleted file mode 100644 index a042b7e734..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.6.2.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on JDT version 4.6.2 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/log/?h=R4_6_maintenance to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.1.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.12.2 -org.eclipse.platform:org.eclipse.core.commands:3.9.100 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.0 -org.eclipse.platform:org.eclipse.core.jobs:3.10.0 -org.eclipse.platform:org.eclipse.core.resources:3.13.0 -org.eclipse.platform:org.eclipse.core.runtime:3.14.0 -org.eclipse.platform:org.eclipse.equinox.app:1.3.500 -org.eclipse.platform:org.eclipse.equinox.common:3.10.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.100 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.0 -org.eclipse.platform:org.eclipse.osgi:3.13.0 -org.eclipse.platform:org.eclipse.text:3.6.300 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.6.3.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.6.3.lockfile deleted file mode 100644 index 714ff708c8..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.6.3.lockfile +++ /dev/null @@ -1,2 +0,0 @@ -# Spotless formatter based on JDT version 4.6.3 (see https://projects.eclipse.org/projects/eclipse.jdt) -com.diffplug.spotless:spotless-ext-eclipse-jdt:4.6.3 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.7.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.7.0.lockfile deleted file mode 100644 index 9e3eefbcb1..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.7.0.lockfile +++ /dev/null @@ -1,2 +0,0 @@ -# Spotless formatter based on JDT version 4.7 (see https://projects.eclipse.org/projects/eclipse.jdt) -com.diffplug.spotless:spotless-ext-eclipse-jdt:4.7.0 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.7.1.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.7.1.lockfile deleted file mode 100644 index 650c67e13b..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.7.1.lockfile +++ /dev/null @@ -1,2 +0,0 @@ -# Spotless formatter based on JDT version 4.7.1 (see https://projects.eclipse.org/projects/eclipse.jdt) -com.diffplug.spotless:spotless-ext-eclipse-jdt:4.7.1 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.7.2.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.7.2.lockfile deleted file mode 100644 index 35abd036aa..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.7.2.lockfile +++ /dev/null @@ -1,2 +0,0 @@ -# Spotless formatter based on JDT version 4.7.2 (see https://projects.eclipse.org/projects/eclipse.jdt) -com.diffplug.spotless:spotless-ext-eclipse-jdt:4.7.2 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.7.3a.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.7.3a.lockfile deleted file mode 100644 index a5e7aaa57b..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.7.3a.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on JDT version 4.7.3a (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/log/?h=R4_7_maintenance to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.1.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.13.101 -org.eclipse.platform:org.eclipse.core.commands:3.9.100 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.0 -org.eclipse.platform:org.eclipse.core.jobs:3.10.0 -org.eclipse.platform:org.eclipse.core.resources:3.13.0 -org.eclipse.platform:org.eclipse.core.runtime:3.14.0 -org.eclipse.platform:org.eclipse.equinox.app:1.3.500 -org.eclipse.platform:org.eclipse.equinox.common:3.10.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.100 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.0 -org.eclipse.platform:org.eclipse.osgi:3.13.0 -org.eclipse.platform:org.eclipse.text:3.6.300 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.8.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.8.0.lockfile deleted file mode 100644 index a9204f5a45..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.8.0.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on JDT version 4.8.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/tag/?h=R4_8 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.1.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.14.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.100 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.0 -org.eclipse.platform:org.eclipse.core.jobs:3.10.0 -org.eclipse.platform:org.eclipse.core.resources:3.13.0 -org.eclipse.platform:org.eclipse.core.runtime:3.14.0 -org.eclipse.platform:org.eclipse.equinox.app:1.3.500 -org.eclipse.platform:org.eclipse.equinox.common:3.10.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.100 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.0 -org.eclipse.platform:org.eclipse.osgi:3.13.0 -org.eclipse.platform:org.eclipse.text:3.6.300 \ No newline at end of file diff --git a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.9.0.lockfile b/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.9.0.lockfile deleted file mode 100644 index 5a19c69254..0000000000 --- a/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_jdt_formatter/v4.9.0.lockfile +++ /dev/null @@ -1,18 +0,0 @@ -# Spotless formatter based on JDT version 4.9.0 (see https://projects.eclipse.org/projects/eclipse.jdt) -# Compare tag in M2 pom with https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/tag/?h=R4_9 to determine core version. -com.diffplug.spotless:spotless-eclipse-jdt:4.8.0 -com.diffplug.spotless:spotless-eclipse-base:3.1.1 -com.google.code.findbugs:annotations:3.0.0 -com.google.code.findbugs:jsr305:3.0.0 -org.eclipse.jdt:org.eclipse.jdt.core:3.15.0 -org.eclipse.platform:org.eclipse.core.commands:3.9.100 -org.eclipse.platform:org.eclipse.core.contenttype:3.7.0 -org.eclipse.platform:org.eclipse.core.jobs:3.10.0 -org.eclipse.platform:org.eclipse.core.resources:3.13.0 -org.eclipse.platform:org.eclipse.core.runtime:3.14.0 -org.eclipse.platform:org.eclipse.equinox.app:1.3.500 -org.eclipse.platform:org.eclipse.equinox.common:3.10.0 -org.eclipse.platform:org.eclipse.equinox.preferences:3.7.100 -org.eclipse.platform:org.eclipse.equinox.registry:3.8.0 -org.eclipse.platform:org.eclipse.osgi:3.13.0 -org.eclipse.platform:org.eclipse.text:3.6.300 \ No newline at end of file diff --git a/lib-extra/src/test/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStepTest.java b/lib-extra/src/test/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStepTest.java index f39673cdc8..9ed9f2f227 100644 --- a/lib-extra/src/test/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStepTest.java +++ b/lib-extra/src/test/java/com/diffplug/spotless/extra/cpp/EclipseCdtFormatterStepTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,12 +20,10 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; -import com.diffplug.spotless.Jvm; import com.diffplug.spotless.TestProvisioner; -import com.diffplug.spotless.extra.eclipse.EclipseResourceHarness; +import com.diffplug.spotless.extra.eclipse.EquoResourceHarness; -class EclipseCdtFormatterStepTest extends EclipseResourceHarness { - private final static Jvm.Support JVM_SUPPORT = Jvm. support("Oldest Version").add(8, "4.11.0"); +class EclipseCdtFormatterStepTest extends EquoResourceHarness { private final static String INPUT = "#include ;\nint main(int argc, \nchar *argv[]) {}"; private final static String EXPECTED = "#include ;\nint main(int argc, char *argv[]) {\n}\n"; @@ -40,6 +38,6 @@ void formatWithVersion(String version) throws Exception { } private static Stream formatWithVersion() { - return Stream.of(JVM_SUPPORT.getRecommendedFormatterVersion(), EclipseCdtFormatterStep.defaultVersion()); + return Stream.of("10.6", "10.7", EclipseCdtFormatterStep.defaultVersion()); } } diff --git a/lib-extra/src/test/java/com/diffplug/spotless/extra/eclipse/EquoResourceHarness.java b/lib-extra/src/test/java/com/diffplug/spotless/extra/eclipse/EquoResourceHarness.java new file mode 100644 index 0000000000..8d5d955c02 --- /dev/null +++ b/lib-extra/src/test/java/com/diffplug/spotless/extra/eclipse/EquoResourceHarness.java @@ -0,0 +1,99 @@ +/* + * Copyright 2016-2023 DiffPlug + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.diffplug.spotless.extra.eclipse; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.File; +import java.util.Arrays; + +import com.diffplug.spotless.FormatterStep; +import com.diffplug.spotless.LineEnding; +import com.diffplug.spotless.ResourceHarness; +import com.diffplug.spotless.extra.EquoBasedStepBuilder; + +/** + * Provides a common formatter test for all Spotless Eclipse Formatter steps + * provided by lib-extra. + *

+ * The external Spotless Eclipse Formatter Step implementations are responsible + * to test the functionality of the Spotless adaptations for the Eclipse formatter. + * This explicitly includes a check of various forms of valid and invalid input + * to cover all relevant execution paths during the code formatting and internal + * exception handling. + *

+ *

+ * The lib-extra users, like plugin-gradle and plugin-maven are responsible + * to test the correct provision of user settings to the generic + * Spotless Eclipse Formatter steps provided by lib-extra. + *

+ */ +public class EquoResourceHarness extends ResourceHarness { + private final EquoBasedStepBuilder stepBuilder; + private final String fileName; + private final String input; + private final String expected; + + /** + * Create harness to be used for several versions of the formatter step + * @param builder Eclipse Formatter step builder + * @param unformatted Simple unformatted input + * @param formatted Expected formatted output + */ + public EquoResourceHarness(EquoBasedStepBuilder builder, String unformatted, String formatted) { + this(builder, "someSourceFile", unformatted, formatted); + } + + /** + * Create harness to be used for several versions of the formatter step + * @param builder Eclipse Formatter step builder + * @param sourceFileName File name of the source file + * @param unformatted Simple unformatted input + * @param formatted Expected formatted output + */ + public EquoResourceHarness(EquoBasedStepBuilder builder, String sourceFileName, String unformatted, String formatted) { + stepBuilder = builder; + fileName = sourceFileName; + input = unformatted; + expected = formatted; + } + + /** + * Assert that formatting input results in expected output + * @param formatterVersion Formatter version + * @param settingsFiles Formatter settings + * @return Formatted string + */ + protected String assertFormatted(String formatterVersion, File... settingsFiles) throws Exception { + String output = format(formatterVersion, settingsFiles); + assertThat(output).isEqualTo(expected); + return output; + } + + /** + * Formatting input results and returns output + * @param formatterVersion Formatter version + * @param settingsFiles Formatter settings + * @return Formatted string + */ + protected String format(String formatterVersion, File... settingsFiles) throws Exception { + File inputFile = setFile(fileName).toContent(input); + stepBuilder.setVersion(formatterVersion); + stepBuilder.setPreferences(Arrays.asList(settingsFiles)); + FormatterStep step = stepBuilder.build(); + return LineEnding.toUnix(step.format(input, inputFile)); + } +} diff --git a/lib-extra/src/test/java/com/diffplug/spotless/extra/groovy/GrEclipseFormatterStepTest.java b/lib-extra/src/test/java/com/diffplug/spotless/extra/groovy/GrEclipseFormatterStepTest.java index f1823e5f52..2bd68d0281 100644 --- a/lib-extra/src/test/java/com/diffplug/spotless/extra/groovy/GrEclipseFormatterStepTest.java +++ b/lib-extra/src/test/java/com/diffplug/spotless/extra/groovy/GrEclipseFormatterStepTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,12 +20,10 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; -import com.diffplug.spotless.Jvm; import com.diffplug.spotless.TestProvisioner; -import com.diffplug.spotless.extra.eclipse.EclipseResourceHarness; +import com.diffplug.spotless.extra.eclipse.EquoResourceHarness; -class GrEclipseFormatterStepTest extends EclipseResourceHarness { - private final static Jvm.Support JVM_SUPPORT = Jvm. support("Oldest Version").add(8, "2.3.0").add(11, "4.17.0"); +public class GrEclipseFormatterStepTest extends EquoResourceHarness { private final static String INPUT = "class F{ def m(){} }"; private final static String EXPECTED = "class F{\n\tdef m(){}\n}"; @@ -40,6 +38,6 @@ void formatWithVersion(String version) throws Exception { } private static Stream formatWithVersion() { - return Stream.of(JVM_SUPPORT.getRecommendedFormatterVersion(), GrEclipseFormatterStep.defaultVersion()); + return Stream.of("4.18", GrEclipseFormatterStep.defaultVersion()); } } diff --git a/lib-extra/src/test/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStepTest.java b/lib-extra/src/test/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStepTest.java index 2ade78f742..91bc8740ab 100644 --- a/lib-extra/src/test/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStepTest.java +++ b/lib-extra/src/test/java/com/diffplug/spotless/extra/java/EclipseJdtFormatterStepTest.java @@ -23,18 +23,15 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; -import com.diffplug.spotless.Jvm; import com.diffplug.spotless.TestProvisioner; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder; -import com.diffplug.spotless.extra.eclipse.EclipseResourceHarness; +import com.diffplug.spotless.extra.EquoBasedStepBuilder; +import com.diffplug.spotless.extra.eclipse.EquoResourceHarness; -class EclipseJdtFormatterStepTest extends EclipseResourceHarness { - private final static String NON_SEMANTIC_ECLIPSE_VERSION = "4.7.3a"; - private final static Jvm.Support JVM_SUPPORT = Jvm. support("Oldest Version").add(8, "4.6.1").add(11, "4.20.0"); +class EclipseJdtFormatterStepTest extends EquoResourceHarness { private final static String INPUT = "package p; class C{}"; private final static String EXPECTED = "package p;\nclass C {\n}"; - private static EclipseBasedStepBuilder createBuilder() { + private static EquoBasedStepBuilder createBuilder() { return EclipseJdtFormatterStep.createBuilder(TestProvisioner.mavenCentral()); } @@ -49,21 +46,20 @@ void formatWithVersion(String version) throws Exception { } private static Stream formatWithVersion() { - return Stream.of(NON_SEMANTIC_ECLIPSE_VERSION, JVM_SUPPORT.getRecommendedFormatterVersion(), EclipseJdtFormatterStep.defaultVersion()); + return Stream.of("4.9", EclipseJdtFormatterStep.defaultVersion()); } /** New format interface requires source file information to distinguish module-info from compilation unit */ @Nested - - class NewFormatInterface extends EclipseResourceHarness { - public NewFormatInterface() throws Exception { + class NewFormatInterface extends EquoResourceHarness { + public NewFormatInterface() { super(createBuilder(), "module-info.java", getTestResource("java/eclipse/ModuleInfoUnformatted.test"), getTestResource("java/eclipse/ModuleInfoFormatted.test")); } @Test void formatModuleInfo() throws Exception { File settingsFile = createTestFile("java/eclipse/ModuleInfo.prefs"); - assertFormatted(JVM_SUPPORT.getRecommendedFormatterVersion(), settingsFile); + assertFormatted("4.11", settingsFile); } } } diff --git a/lib/src/main/java/com/diffplug/spotless/FeatureClassLoader.java b/lib/src/main/java/com/diffplug/spotless/FeatureClassLoader.java index 0703a91318..d07e7e4324 100644 --- a/lib/src/main/java/com/diffplug/spotless/FeatureClassLoader.java +++ b/lib/src/main/java/com/diffplug/spotless/FeatureClassLoader.java @@ -62,7 +62,7 @@ class FeatureClassLoader extends URLClassLoader { @Override protected Class findClass(String name) throws ClassNotFoundException { - if (name.startsWith("com.diffplug.spotless.glue.")) { + if (name.startsWith("com.diffplug.spotless.glue.") || name.startsWith("com.diffplug.spotless.extra.glue.")) { String path = name.replace('.', '/') + ".class"; URL url = findResource(path); if (url == null) { diff --git a/lib/src/main/java/com/diffplug/spotless/JarState.java b/lib/src/main/java/com/diffplug/spotless/JarState.java index abe595e608..afd7c1ddf2 100644 --- a/lib/src/main/java/com/diffplug/spotless/JarState.java +++ b/lib/src/main/java/com/diffplug/spotless/JarState.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,11 +39,12 @@ public final class JarState implements Serializable { private static final long serialVersionUID = 1L; + @Deprecated private final Set mavenCoordinates; private final FileSignature fileSignature; private JarState(Collection mavenCoordinates, FileSignature fileSignature) { - this.mavenCoordinates = new TreeSet(mavenCoordinates); + this.mavenCoordinates = new TreeSet<>(mavenCoordinates); this.fileSignature = fileSignature; } @@ -73,6 +74,12 @@ private static JarState provisionWithTransitives(boolean withTransitives, Collec return new JarState(mavenCoordinates, fileSignature); } + /** Wraps the given collection of a files as a JarState, maintaining the order in the Collection. */ + public static JarState preserveOrder(Collection jars) throws IOException { + FileSignature fileSignature = FileSignature.signAsList(jars); + return new JarState(Collections.emptySet(), fileSignature); + } + URL[] jarUrls() { return fileSignature.files().stream().map(File::toURI).map(ThrowingEx.wrap(URI::toURL)).toArray(URL[]::new); } @@ -102,6 +109,7 @@ public ClassLoader getClassLoader(Serializable key) { } /** Returns unmodifiable view on sorted Maven coordinates */ + @Deprecated public Set getMavenCoordinates() { return Collections.unmodifiableSet(mavenCoordinates); } diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index f3e5276d53..76fc2a9de9 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -6,6 +6,13 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Added * You can now put the filename into a license header template with `$FILE`. ([#1605](https://github.com/diffplug/spotless/pull/1605) fixes [#1147](https://github.com/diffplug/spotless/issues/1147)) * `licenseHeader` default pattern for Java files is updated to `(package|import|public|class|module) `. ([#1614](https://github.com/diffplug/spotless/pull/1614)) +### Changes +* All Eclipse formatters are now based on [Equo Solstice OSGi and p2 shim](https://github.com/equodev/equo-ide/tree/main/solstice). ([#1524](https://github.com/diffplug/spotless/pull/1524)) + * Eclipse JDT bumped default to `4.26` from `4.21`, oldest supported is `4.9`. + * We now recommend dropping the last `.0`, e.g. `4.26` instead of `4.26.0`, you'll get warnings to help you switch. + * Eclipse Groovy bumped default to `4.26` from `4.21`, oldest supported is `4.18`. + * Eclipse CDT bumped default to `11.0` from `4.21`, oldest supported is `10.6`. + * Eclipse WTP is still WIP at [#1622](https://github.com/diffplug/spotless/pull/1622). ## [6.16.0] - 2023-02-27 ### Added diff --git a/plugin-gradle/README.md b/plugin-gradle/README.md index 267136e4ac..aa312e76ed 100644 --- a/plugin-gradle/README.md +++ b/plugin-gradle/README.md @@ -213,7 +213,7 @@ spotless { java { eclipse() // optional: you can specify a specific version and/or config file - eclipse('4.17').configFile('eclipse-prefs.xml') + eclipse('4.26').configFile('eclipse-prefs.xml') ``` @@ -325,9 +325,8 @@ spotless { groovy { // Use the default version and Groovy-Eclipse default configuration greclipse() - // optional: you can specify a specific version or config file(s) - // compatible versions: https://github.com/diffplug/spotless/tree/main/lib-extra/src/main/resources/com/diffplug/spotless/extra/groovy_eclipse_formatter - greclipse('2.3.0').configFile('spotless.eclipseformat.xml', 'org.codehaus.groovy.eclipse.ui.prefs') + // optional: you can specify a specific version or config file(s), version matches the Eclipse Platform + greclipse('4.26').configFile('spotless.eclipseformat.xml', 'org.codehaus.groovy.eclipse.ui.prefs') ``` Groovy-Eclipse formatting errors/warnings lead per default to a build failure. This behavior can be changed by adding the property/key value `ignoreFormatterProblems=true` to a configuration file. In this scenario, files causing problems, will not be modified by this formatter step. @@ -993,7 +992,7 @@ spotless { format 'xml', { target 'src/**/*.xml' // must specify target eclipseWtp('xml') // must specify a type (table below) - eclipseWtp('xml', '4.13.0') // optional version + eclipseWtp('xml', '11.0') // optional version, others at https://download.eclipse.org/tools/cdt/releases/ // you can also specify an arbitrary number of config files eclipseWtp('xml').configFile('spotless.xml.prefs', 'spotless.common.properties' } diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/CppExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/CppExtension.java index 64dabc9ca5..a08dc07d05 100644 --- a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/CppExtension.java +++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/CppExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2020 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ import org.gradle.api.Project; import com.diffplug.spotless.cpp.CppDefaults; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder; +import com.diffplug.spotless.extra.EquoBasedStepBuilder; import com.diffplug.spotless.extra.cpp.EclipseCdtFormatterStep; public class CppExtension extends FormatExtension implements HasBuiltinDelimiterForLicense { @@ -42,7 +42,7 @@ public EclipseConfig eclipseCdt(String version) { } public class EclipseConfig { - private final EclipseBasedStepBuilder builder; + private final EquoBasedStepBuilder builder; EclipseConfig(String version) { builder = EclipseCdtFormatterStep.createBuilder(provisioner()); diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/GroovyExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/GroovyExtension.java index 5e528e1b79..2062946b32 100644 --- a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/GroovyExtension.java +++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/GroovyExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ import org.gradle.api.tasks.GroovySourceSet; import org.gradle.api.tasks.SourceSet; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder; +import com.diffplug.spotless.extra.EquoBasedStepBuilder; import com.diffplug.spotless.extra.groovy.GrEclipseFormatterStep; import com.diffplug.spotless.generic.LicenseHeaderStep; import com.diffplug.spotless.java.ImportOrderStep; @@ -83,7 +83,7 @@ public GrEclipseConfig greclipse(String version) { } public static class GrEclipseConfig { - private final EclipseBasedStepBuilder builder; + private final EquoBasedStepBuilder builder; private final FormatExtension extension; GrEclipseConfig(String version, FormatExtension extension) { diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavaExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavaExtension.java index bfe1a96955..8dd514ab37 100644 --- a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavaExtension.java +++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavaExtension.java @@ -32,7 +32,7 @@ import org.gradle.api.tasks.SourceSet; import com.diffplug.spotless.FormatterStep; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder; +import com.diffplug.spotless.extra.EquoBasedStepBuilder; import com.diffplug.spotless.extra.java.EclipseJdtFormatterStep; import com.diffplug.spotless.generic.LicenseHeaderStep; import com.diffplug.spotless.java.CleanthatJavaStep; @@ -217,7 +217,7 @@ public EclipseConfig eclipse(String version) { } public class EclipseConfig { - private final EclipseBasedStepBuilder builder; + private final EquoBasedStepBuilder builder; EclipseConfig(String version) { builder = EclipseJdtFormatterStep.createBuilder(provisioner()); diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index f65f5e61d4..f324dda349 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -9,6 +9,12 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( * `licenseHeader` default pattern for Java files is updated to `(package|import|public|class|module) `. ([#1614](https://github.com/diffplug/spotless/pull/1614)) ### Changes * Enable incremental up-to-date checking by default. ([#1621](https://github.com/diffplug/spotless/pull/1621)) +* All Eclipse formatters are now based on [Equo Solstice OSGi and p2 shim](https://github.com/equodev/equo-ide/tree/main/solstice). ([#1524](https://github.com/diffplug/spotless/pull/1524)) + * Eclipse JDT bumped default to `4.26` from `4.21`, oldest supported is `4.9`. + * We now recommend dropping the last `.0`, e.g. `4.26` instead of `4.26.0`, you'll get warnings to help you switch. + * Eclipse Groovy bumped default to `4.26` from `4.21`, oldest supported is `4.18`. + * Eclipse CDT bumped default to `11.0` from `4.21`, oldest supported is `10.6`. + * Eclipse WTP is still WIP at [#1622](https://github.com/diffplug/spotless/pull/1622). ## [2.34.0] - 2023-02-27 ### Added diff --git a/plugin-maven/README.md b/plugin-maven/README.md index 4af6308b89..340da9ae9f 100644 --- a/plugin-maven/README.md +++ b/plugin-maven/README.md @@ -237,7 +237,7 @@ any other maven phase (i.e. compile) then it can be configured as below; ```xml - 4.21.0 + 4.26 ${project.basedir}/eclipse-formatter.xml ``` @@ -331,7 +331,7 @@ These mechanisms already exist for the Gradle plugin. ```xml - 4.21.0 + 4.26 ${project.basedir}/greclipse.properties ``` @@ -481,7 +481,7 @@ Additionally, `editorConfigOverride` options will override what's supplied in `. ```xml - 4.21.0 + 11.0 ${project.basedir}/eclipse-cdt.xml ``` diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/cpp/EclipseCdt.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/cpp/EclipseCdt.java index 78484abfba..a92e7b2423 100644 --- a/plugin-maven/src/main/java/com/diffplug/spotless/maven/cpp/EclipseCdt.java +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/cpp/EclipseCdt.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2020 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import org.apache.maven.plugins.annotations.Parameter; import com.diffplug.spotless.FormatterStep; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder; +import com.diffplug.spotless.extra.EquoBasedStepBuilder; import com.diffplug.spotless.extra.cpp.EclipseCdtFormatterStep; import com.diffplug.spotless.maven.FormatterStepConfig; import com.diffplug.spotless.maven.FormatterStepFactory; @@ -36,7 +36,7 @@ public class EclipseCdt implements FormatterStepFactory { @Override public FormatterStep newFormatterStep(FormatterStepConfig stepConfig) { - EclipseBasedStepBuilder eclipseConfig = EclipseCdtFormatterStep.createBuilder(stepConfig.getProvisioner()); + EquoBasedStepBuilder eclipseConfig = EclipseCdtFormatterStep.createBuilder(stepConfig.getProvisioner()); eclipseConfig.setVersion(version == null ? EclipseCdtFormatterStep.defaultVersion() : version); if (null != file) { File settingsFile = stepConfig.getFileLocator().locateFile(file); diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/groovy/GrEclipse.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/groovy/GrEclipse.java index 81da109e04..8836993cce 100644 --- a/plugin-maven/src/main/java/com/diffplug/spotless/maven/groovy/GrEclipse.java +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/groovy/GrEclipse.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 DiffPlug + * Copyright 2020-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import org.apache.maven.plugins.annotations.Parameter; import com.diffplug.spotless.FormatterStep; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder; +import com.diffplug.spotless.extra.EquoBasedStepBuilder; import com.diffplug.spotless.extra.groovy.GrEclipseFormatterStep; import com.diffplug.spotless.maven.FormatterStepConfig; import com.diffplug.spotless.maven.FormatterStepFactory; @@ -36,7 +36,7 @@ public class GrEclipse implements FormatterStepFactory { @Override public FormatterStep newFormatterStep(FormatterStepConfig stepConfig) { - EclipseBasedStepBuilder grEclipseConfig = GrEclipseFormatterStep.createBuilder(stepConfig.getProvisioner()); + EquoBasedStepBuilder grEclipseConfig = GrEclipseFormatterStep.createBuilder(stepConfig.getProvisioner()); grEclipseConfig.setVersion(version == null ? GrEclipseFormatterStep.defaultVersion() : version); if (null != file) { File settingsFile = stepConfig.getFileLocator().locateFile(file); diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/Eclipse.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/Eclipse.java index 1e6508121e..e30a4faad9 100644 --- a/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/Eclipse.java +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/java/Eclipse.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ import org.apache.maven.plugins.annotations.Parameter; import com.diffplug.spotless.FormatterStep; -import com.diffplug.spotless.extra.EclipseBasedStepBuilder; +import com.diffplug.spotless.extra.EquoBasedStepBuilder; import com.diffplug.spotless.extra.java.EclipseJdtFormatterStep; import com.diffplug.spotless.maven.FormatterStepConfig; import com.diffplug.spotless.maven.FormatterStepFactory; @@ -36,7 +36,7 @@ public class Eclipse implements FormatterStepFactory { @Override public FormatterStep newFormatterStep(FormatterStepConfig stepConfig) { - EclipseBasedStepBuilder eclipseConfig = EclipseJdtFormatterStep.createBuilder(stepConfig.getProvisioner()); + EquoBasedStepBuilder eclipseConfig = EclipseJdtFormatterStep.createBuilder(stepConfig.getProvisioner()); eclipseConfig.setVersion(version == null ? EclipseJdtFormatterStep.defaultVersion() : version); if (null != file) { File settingsFile = stepConfig.getFileLocator().locateFile(file); diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/MavenProvisionerTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/MavenProvisionerTest.java index 3e769d7705..cabbf7c5c0 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/MavenProvisionerTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/MavenProvisionerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 DiffPlug + * Copyright 2016-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ class MavenProvisionerTest extends MavenIntegrationHarness { void testMultipleDependenciesExcludingTransitives() throws Exception { writePomWithJavaSteps( "", - " 4.8.0", + " 4.9", ""); setFile("formatter.xml").toResource("java/eclipse/formatter.xml"); assertResolveDependenciesWorks(); diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/MultiModuleProjectTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/MultiModuleProjectTest.java index a93b4ffdd0..a2d491cb2b 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/MultiModuleProjectTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/MultiModuleProjectTest.java @@ -70,7 +70,7 @@ void testConfigurationDependency() throws Exception { "", " ", " configs/eclipse-formatter.xml", - " 4.7.1", + " 4.9", " ", "", "", diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/groovy/GrEclipseTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/groovy/GrEclipseTest.java index 8807f47cc9..34d95dc7d2 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/groovy/GrEclipseTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/groovy/GrEclipseTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2021 DiffPlug + * Copyright 2020-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,7 @@ private void writePomWithGrEclipse() throws IOException { writePomWithGroovySteps( "", " ${basedir}/greclipse.properties", - " 4.19.0", + " 4.25", ""); setFile("greclipse.properties").toResource("groovy/greclipse/format/greclipse.properties"); } diff --git a/settings.gradle b/settings.gradle index cf200a94f6..683692b6ec 100644 --- a/settings.gradle +++ b/settings.gradle @@ -24,6 +24,8 @@ plugins { id 'io.github.davidburstrom.version-compatibility' version '0.4.0' apply false // https://plugins.gradle.org/plugin/com.gradle.enterprise id 'com.gradle.enterprise' version '3.12.4' + // https://github.com/equodev/equo-ide/blob/main/plugin-gradle/CHANGELOG.md + id 'dev.equo.ide' version '0.17.2' apply false } dependencyResolutionManagement {