From 1c9ce2a0945d1fc2d153c33896ed0de8dc64312d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rg=20Prante?= Date: Fri, 17 Jun 2022 10:53:57 +0200 Subject: [PATCH] update to Groovy 4.0.3 --- build.gradle | 2 +- gradle.properties | 11 +- gradle/compile/groovy-dynamic-tests.gradle | 29 +++ gradle/compile/groovy-dynamic.gradle | 31 +++ gradle/compile/groovy.gradle | 5 +- gradle/compile/groovyc.groovy | 7 + gradle/test/junit5.gradle | 13 +- gradle/wrapper/gradle-wrapper.jar | Bin 59536 -> 59821 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- groovy-crypt/README.adoc | 11 - groovy-crypt/gradle.properties | 1 + .../crypt/random/MersenneTwisterRandom.groovy | 6 +- groovy-ftp/LICENSE.txt | 202 ++++++++++++++++++ groovy-ftp/build.gradle | 2 +- groovy-ftp/gradle.properties | 1 + groovy-ftps/LICENSE.txt | 202 ++++++++++++++++++ groovy-ftps/build.gradle | 2 +- groovy-ftps/gradle.properties | 1 + groovy-git/build.gradle | 9 +- groovy-git/gradle.properties | 1 + .../groovy/org/xbib/groovy/git/Status.groovy | 24 +-- .../xbib/groovy/git/auth/AuthConfig.groovy | 2 +- .../xbib/groovy/git/internal/OpSyntax.groovy | 2 +- .../xbib/groovy/git/operation/FetchOp.groovy | 2 +- .../xbib/groovy/git/operation/MergeOp.groovy | 4 +- .../xbib/groovy/git/operation/PushOp.groovy | 8 +- .../groovy/git/operation/RemoteAddOp.groovy | 6 +- .../xbib/groovy/git/operation/ShowOp.groovy | 8 +- .../groovy/git/service/ResolveService.groovy | 4 +- .../org/xbib/groovy/git/util/GitUtil.groovy | 8 +- groovy-ldap/build.gradle | 7 +- groovy-ldap/gradle.properties | 1 + .../org/xbib/groovy/ldap/JavaSearchTest.java | 5 +- groovy-mail/build.gradle | 2 +- groovy-mail/gradle.properties | 1 + groovy-sshd/build.gradle | 2 +- groovy-sshd/gradle.properties | 1 + settings.gradle | 29 ++- 38 files changed, 570 insertions(+), 84 deletions(-) create mode 100644 gradle/compile/groovy-dynamic-tests.gradle create mode 100644 gradle/compile/groovy-dynamic.gradle create mode 100644 gradle/compile/groovyc.groovy create mode 100644 groovy-crypt/gradle.properties create mode 100644 groovy-ftp/LICENSE.txt create mode 100644 groovy-ftp/gradle.properties create mode 100644 groovy-ftps/LICENSE.txt create mode 100644 groovy-ftps/gradle.properties create mode 100644 groovy-git/gradle.properties create mode 100644 groovy-ldap/gradle.properties create mode 100644 groovy-mail/gradle.properties create mode 100644 groovy-sshd/gradle.properties diff --git a/build.gradle b/build.gradle index 6c2cdde..d9cef1b 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } wrapper { - gradleVersion = "${project.property('gradle.wrapper.version')}" + gradleVersion = libs.versions.gradle.get() distributionType = Wrapper.DistributionType.ALL } diff --git a/gradle.properties b/gradle.properties index d9689c1..c1714d1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,14 +1,5 @@ group = org.xbib.groovy name = groovy-extensions -version = 4.0.2.0 +version = 4.0.3.0 org.gradle.warning.mode = ALL -groovy.version = 4.0.2 -gradle.wrapper.version = 7.3.2 -files.version = 3.0.0 -ftp.version = 2.6.0 -mail.version = 1.6.2 -sshd.version = 2.6.0.0 -junit4.version = 4.13.2 -jgit.version = 5.13.0.202109080827-r -spock.version = 2.2-M1-groovy-4.0 diff --git a/gradle/compile/groovy-dynamic-tests.gradle b/gradle/compile/groovy-dynamic-tests.gradle new file mode 100644 index 0000000..4efae2b --- /dev/null +++ b/gradle/compile/groovy-dynamic-tests.gradle @@ -0,0 +1,29 @@ +apply plugin: 'groovy' + +dependencies { + implementation libs.groovy.core + testImplementation libs.groovy.core +} + +compileGroovy { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + groovyOptions.configurationScript = rootProject.file('gradle/compile/groovyc.groovy') +} + +compileTestGroovy { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + +tasks.withType(GroovyCompile) { + options.compilerArgs + if (!options.compilerArgs.contains("-processor")) { + options.compilerArgs << '-proc:none' + } +} + +task groovydocJar(type: Jar, dependsOn: 'groovydoc') { + from groovydoc.destinationDir + archiveClassifier.set('javadoc') +} diff --git a/gradle/compile/groovy-dynamic.gradle b/gradle/compile/groovy-dynamic.gradle new file mode 100644 index 0000000..e044cbf --- /dev/null +++ b/gradle/compile/groovy-dynamic.gradle @@ -0,0 +1,31 @@ +apply plugin: 'groovy' + +dependencies { + implementation libs.groovy.core + testImplementation libs.groovy.core +} + +compileGroovy { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + +compileTestGroovy { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + +tasks.withType(GroovyCompile) { + if (!options.compilerArgs.contains("-processor")) { + options.compilerArgs.add('-proc:none') + } +} + +task groovydocJar(type: Jar, dependsOn: 'groovydoc') { + from groovydoc.destinationDir + archiveClassifier.set('groovydoc') +} + +artifacts { + archives groovydocJar +} diff --git a/gradle/compile/groovy.gradle b/gradle/compile/groovy.gradle index b7a58d4..0cfc34e 100644 --- a/gradle/compile/groovy.gradle +++ b/gradle/compile/groovy.gradle @@ -1,17 +1,20 @@ apply plugin: 'groovy' dependencies { - implementation "org.apache.groovy:groovy:${project.property('groovy.version')}" + implementation libs.groovy.core + testImplementation libs.groovy.core } compileGroovy { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 + groovyOptions.configurationScript = rootProject.file('gradle/compile/groovyc.groovy') } compileTestGroovy { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 + groovyOptions.configurationScript = rootProject.file('gradle/compile/groovyc.groovy') } tasks.withType(GroovyCompile) { diff --git a/gradle/compile/groovyc.groovy b/gradle/compile/groovyc.groovy new file mode 100644 index 0000000..d5db92a --- /dev/null +++ b/gradle/compile/groovyc.groovy @@ -0,0 +1,7 @@ +import groovy.transform.TypeChecked +import groovy.transform.CompileStatic + +withConfig(configuration) { + ast(TypeChecked) + ast(CompileStatic) +} diff --git a/gradle/test/junit5.gradle b/gradle/test/junit5.gradle index 692ad51..c62d04a 100644 --- a/gradle/test/junit5.gradle +++ b/gradle/test/junit5.gradle @@ -1,17 +1,14 @@ - -def junitVersion = project.hasProperty('junit.version')?project.property('junit.version'):'5.8.0' -def hamcrestVersion = project.hasProperty('hamcrest.version')?project.property('hamcrest.version'):'2.2' - dependencies { - testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}" - testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}" - testImplementation "org.hamcrest:hamcrest-library:${hamcrestVersion}" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}" + testImplementation libs.junit.jupiter.api + testImplementation libs.junit.jupiter.params + testImplementation libs.hamcrest + testRuntimeOnly libs.junit.jupiter.engine } test { useJUnitPlatform() failFast = false + systemProperty 'java.util.logging.config.file', 'src/test/resources/logging.properties' testLogging { events 'STARTED', 'PASSED', 'FAILED', 'SKIPPED' } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f2ae8848c63b8b4dea2cb829da983f2fa..41d9927a4d4fb3f96a785543079b8df6723c946b 100644 GIT binary patch delta 8958 zcmY+KWl$VIlZIh&f(Hri?gR<$?iyT!TL`X;1^2~W7YVSq1qtqM!JWlDxLm%}UESUM zndj}Uny%^UnjhVhFb!8V3s(a#fIy>`VW15{5nuy;_V&a5O#0S&!a4dSkUMz_VHu3S zGA@p9Q$T|Sj}tYGWdjH;Mpp8m&yu&YURcrt{K;R|kM~(*{v%QwrBJIUF+K1kX5ZmF zty3i{d`y0;DgE+de>vN@yYqFPe1Ud{!&G*Q?iUc^V=|H%4~2|N zW+DM)W!`b&V2mQ0Y4u_)uB=P@-2`v|Wm{>CxER1P^ z>c}ZPZ)xxdOCDu59{X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j5+ z`GM|!keqcj;FKTa_qq;{*dHRXAq157hlB@kL#8%yAm2AgfU|*rDKX@FLlp=HL8ddv zAWLCHe@DcDeB2}fl7#=0+#<05c3=VqM*O3bkr@9X4nO|)q0hU;Gye{L8ZN*NH8Id@mP-u;Fmb8YuorjLrW&ndip8CN%_qp982r w1WEnz9^$&s1hkp_3#lPJQ~!HI7WYYjA7>z!`?f%npAh2%rB@vD|Lau$2O)#1n*aa+ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ac0b842..92f06b5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/groovy-crypt/README.adoc b/groovy-crypt/README.adoc index 8a8c0d6..4da0343 100644 --- a/groovy-crypt/README.adoc +++ b/groovy-crypt/README.adoc @@ -1,17 +1,6 @@ = Groovy crypt library -image:https://api.travis-ci.org/xbib/groovy-crypt.svg[title="Build status", link="https://travis-ci.org/xbib/groovy-crypt/"] -image:https://maven-badges.herokuapp.com/maven-central/org.xbib.groovy/groovy-crypt/badge.svg[title="Maven Central", link="http://search.maven.org/#search%7Cga%7C1%7Cxbib%20groovy-crypt"] -image:https://img.shields.io/badge/License-Apache%202.0-blue.svg[title="Apache License 2.0", link="https://opensource.org/licenses/Apache-2.0"] -image:https://img.shields.io/twitter/url/https/twitter.com/xbib.svg?style=social&label=Follow%20%40xbib[title="Twitter", link="https://twitter.com/xbib"] - -image:https://sonarqube.com/api/badges/gate?key=org.xbib.groovy:groovy-crypt[title="Quality Gate", link="https://sonarqube.com/dashboard/index?id=org.xbib.groovy%3Agroovy-crypt"] -image:https://sonarqube.com/api/badges/measure?key=org.xbib.groovy:groovy-crypt&metric=coverage[title="Coverage", link="https://sonarqube.com/dashboard/index?id=org.xbib.groovy%3Agroovy-crypt"] -image:https://sonarqube.com/api/badges/measure?key=org.xbib.groovy:groovy-crypt&metric=vulnerabilities[title="Vulnerabilities", link="https://sonarqube.com/dashboard/index?id=org.xbib.groovy%3Agroovy-crypt"] -image:https://sonarqube.com/api/badges/measure?key=org.xbib.groovy:groovy-crypt&metric=bugs[title="Bugs", link="https://sonarqube.com/dashboard/index?id=org.xbib.groovy%3Agroovy-crypt"] -image:https://sonarqube.com/api/badges/measure?key=org.xbib.groovy:groovy-crypt&metric=sqale_debt_ratio[title="Technical debt ratio", link="https://sonarqube.com/dashboard/index?id=org.xbib.groovy%3Agroovy-crypt"] - This Groovy crypt implementation of the `crypt(3)` function provided in the GNU C library (glibc) was derived from crypt4j by Carl Harris https://github.com/soulwing/crypt4j diff --git a/groovy-crypt/gradle.properties b/groovy-crypt/gradle.properties new file mode 100644 index 0000000..543c1fe --- /dev/null +++ b/groovy-crypt/gradle.properties @@ -0,0 +1 @@ +version = 4.0.0 diff --git a/groovy-crypt/src/main/groovy/org/xbib/groovy/crypt/random/MersenneTwisterRandom.groovy b/groovy-crypt/src/main/groovy/org/xbib/groovy/crypt/random/MersenneTwisterRandom.groovy index ae43b20..c1378eb 100644 --- a/groovy-crypt/src/main/groovy/org/xbib/groovy/crypt/random/MersenneTwisterRandom.groovy +++ b/groovy-crypt/src/main/groovy/org/xbib/groovy/crypt/random/MersenneTwisterRandom.groovy @@ -102,10 +102,12 @@ class MersenneTwisterRandom extends Random { } private static int[] convertBytesToInts(byte[] bytes) { - if (bytes.length % 4 != 0) { + int l = bytes.length + if (l % 4 != 0) { throw new IllegalArgumentException("number of input bytes must be a multiple of 4") } - int[] ints = new int[bytes.length / 4] + int size = l.intdiv(4) + int[] ints = new int[size] for (int i = 0; i < ints.length; i++) { ints[i] = convertBytesToInt(bytes, i * 4) } diff --git a/groovy-ftp/LICENSE.txt b/groovy-ftp/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/groovy-ftp/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) 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. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/groovy-ftp/build.gradle b/groovy-ftp/build.gradle index 45fa40f..d3a9396 100644 --- a/groovy-ftp/build.gradle +++ b/groovy-ftp/build.gradle @@ -1,5 +1,5 @@ apply from: rootProject.file('gradle/compile/groovy.gradle') dependencies { - api "org.xbib:ftp-fs:${project.property('ftp.version')}" + api libs.ftp.fs } diff --git a/groovy-ftp/gradle.properties b/groovy-ftp/gradle.properties new file mode 100644 index 0000000..543c1fe --- /dev/null +++ b/groovy-ftp/gradle.properties @@ -0,0 +1 @@ +version = 4.0.0 diff --git a/groovy-ftps/LICENSE.txt b/groovy-ftps/LICENSE.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/groovy-ftps/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) 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. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/groovy-ftps/build.gradle b/groovy-ftps/build.gradle index 45fa40f..d3a9396 100644 --- a/groovy-ftps/build.gradle +++ b/groovy-ftps/build.gradle @@ -1,5 +1,5 @@ apply from: rootProject.file('gradle/compile/groovy.gradle') dependencies { - api "org.xbib:ftp-fs:${project.property('ftp.version')}" + api libs.ftp.fs } diff --git a/groovy-ftps/gradle.properties b/groovy-ftps/gradle.properties new file mode 100644 index 0000000..543c1fe --- /dev/null +++ b/groovy-ftps/gradle.properties @@ -0,0 +1 @@ +version = 4.0.0 diff --git a/groovy-git/build.gradle b/groovy-git/build.gradle index f760d32..498767d 100644 --- a/groovy-git/build.gradle +++ b/groovy-git/build.gradle @@ -1,8 +1,7 @@ -apply from: rootProject.file('gradle/compile/groovy.gradle') +apply from: rootProject.file('gradle/compile/groovy-dynamic-tests.gradle') dependencies { - api "org.eclipse.jgit:org.eclipse.jgit:${project.property('jgit.version')}" - testImplementation "org.apache.groovy:groovy:${project.property('groovy.version')}" - testImplementation "org.spockframework:spock-core:${project.property('spock.version')}" - testImplementation "org.spockframework:spock-junit4:${project.property('spock.version')}" + api libs.jgit + testImplementation libs.spock.core + testImplementation libs.spock.junit4 } diff --git a/groovy-git/gradle.properties b/groovy-git/gradle.properties new file mode 100644 index 0000000..543c1fe --- /dev/null +++ b/groovy-git/gradle.properties @@ -0,0 +1 @@ +version = 4.0.0 diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/Status.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/Status.groovy index 445f4d9..5686b3c 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/Status.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/Status.groovy @@ -9,35 +9,35 @@ import groovy.transform.ToString @EqualsAndHashCode @ToString(includeNames=true) class Status { - final Changes staged - final Changes unstaged - final Set conflicts + Changes staged + Changes unstaged + Set conflicts Status(Map args = [:]) { def invalidArgs = args.keySet() - ['staged', 'unstaged', 'conflicts'] if (invalidArgs) { throw new IllegalArgumentException("Following keys are not supported: ${invalidArgs}") } - this.staged = 'staged' in args ? new Changes(args.staged) : new Changes() - this.unstaged = 'unstaged' in args ? new Changes(args.unstaged) : new Changes() - this.conflicts = 'conflicts' in args ? args.conflicts : [] + this.staged = 'staged' in args ? new Changes(args['staged'] as Map) : new Changes() + this.unstaged = 'unstaged' in args ? new Changes(args['unstaged'] as Map) : new Changes() + this.conflicts = 'conflicts' in args ? args['conflicts'] as Set : [] as Set } @EqualsAndHashCode @ToString(includeNames=true) class Changes { - final Set added - final Set modified - final Set removed + Set added + Set modified + Set removed Changes(Map args = [:]) { def invalidArgs = args.keySet() - ['added', 'modified', 'removed'] if (invalidArgs) { throw new IllegalArgumentException("Following keys are not supported: ${invalidArgs}") } - this.added = 'added' in args ? args.added : [] - this.modified = 'modified' in args ? args.modified : [] - this.removed = 'removed' in args ? args.removed : [] + this.added = 'added' in args ? args['added'] as Set : [] as Set + this.modified = 'modified' in args ? args['modified'] as Set : [] as Set + this.removed = 'removed' in args ? args['removed'] as Set : [] as Set } /** diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/auth/AuthConfig.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/auth/AuthConfig.groovy index 730d045..39b3e08 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/auth/AuthConfig.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/auth/AuthConfig.groovy @@ -52,6 +52,6 @@ class AuthConfig { * @throws IllegalArgumentException if force is set to an invalid option */ static AuthConfig fromSystem() { - return fromMap(System.properties, System.env) + return fromMap(System.properties as Map, System.getenv() as Map) } } diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/OpSyntax.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/OpSyntax.groovy index 547997a..4d15e8f 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/OpSyntax.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/OpSyntax.groovy @@ -14,7 +14,7 @@ class OpSyntax { def op = opClass.newInstance(classArgs) args.forEach { key, value -> - op[key] = value + op[key as String] = value } return op.call() diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/FetchOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/FetchOp.groovy index 50f7e8f..b2af5c6 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/FetchOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/FetchOp.groovy @@ -53,7 +53,7 @@ class FetchOp implements Callable { TransportOpUtil.configure(cmd, repo.credentials) if (remote) { cmd.remote = remote } cmd.refSpecs = refSpecs.collect { - new RefSpec(it) + new RefSpec(it as String) } cmd.removeDeletedRefs = prune cmd.tagOpt = tagMode.jgit diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/MergeOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/MergeOp.groovy index 3964d42..2c7b064 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/MergeOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/MergeOp.groovy @@ -1,5 +1,7 @@ package org.xbib.groovy.git.operation +import org.eclipse.jgit.lib.Ref + import java.util.concurrent.Callable import org.xbib.groovy.git.Repository import org.xbib.groovy.git.internal.Operation @@ -60,7 +62,7 @@ class MergeOp implements Callable { * we want to preserve ref name in merge commit msg. if it's a ref, don't * resolve down to commit id */ - def ref = repo.jgit.repository.findRef(head) + Ref ref = repo.jgit.repository.findRef(head as String) if (ref == null) { def revstr = new ResolveService(repo).toRevisionString(head) cmd.include(GitUtil.resolveObject(repo, revstr)) diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/PushOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/PushOp.groovy index bf2e9d3..12e6547 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/PushOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/PushOp.groovy @@ -1,5 +1,7 @@ package org.xbib.groovy.git.operation +import org.eclipse.jgit.lib.Ref + import java.util.concurrent.Callable import org.xbib.groovy.git.PushException import org.xbib.groovy.git.Repository @@ -63,7 +65,11 @@ class PushOp implements Callable { cmd.remote = remote } refsOrSpecs.each { - cmd.add(it) + if (it instanceof Ref) { + cmd.add(it as Ref) + } else if (it instanceof String) { + cmd.add(it as String) + } } if (all) { cmd.setPushAll() diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RemoteAddOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RemoteAddOp.groovy index 553a34b..69bdfe6 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RemoteAddOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RemoteAddOp.groovy @@ -60,10 +60,10 @@ class RemoteAddOp implements Callable { throw new IllegalStateException("remote $name already exists") } def toUri = { - url -> new URIish(url) + url -> new URIish(url as String) } def toRefSpec = { - spec -> new RefSpec(spec) + spec -> new RefSpec(spec as String) } RemoteConfig remote = new RemoteConfig(config, name) if (url) { @@ -72,7 +72,7 @@ class RemoteAddOp implements Callable { if (pushUrl) { remote.addPushURI(toUri(pushUrl)) } - remote.fetchRefSpecs = (fetchRefSpecs ?: ["+refs/heads/*:refs/remotes/$name/*"]).collect(toRefSpec) + remote.fetchRefSpecs = (fetchRefSpecs ?: ["+refs/heads/*:refs/remotes/$name/*"]).collect(toRefSpec) as List remote.pushRefSpecs = pushRefSpecs.collect(toRefSpec) remote.mirror = mirror remote.update(config) diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/ShowOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/ShowOp.groovy index 554c62d..b9658a1 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/ShowOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/ShowOp.groovy @@ -1,5 +1,7 @@ package org.xbib.groovy.git.operation +import org.eclipse.jgit.lib.AnyObjectId + import java.util.concurrent.Callable import org.xbib.groovy.git.CommitDiff @@ -44,8 +46,8 @@ class ShowOp implements Callable { walk.recursive = true if (parentId) { - walk.addTree(parentId.tree) - walk.addTree(commitId.tree) + walk.addTree(parentId['tree'] as AnyObjectId) + walk.addTree(commitId['tree'] as AnyObjectId) List initialEntries = DiffEntry.scan(walk) RenameDetector detector = new RenameDetector(repo.jgit.repository) detector.addAll(initialEntries) @@ -61,7 +63,7 @@ class ShowOp implements Callable { renamed: entriesByType[ChangeType.RENAME].collect { it.newPath } ) } else { - walk.addTree(commitId.tree) + walk.addTree(commitId['tree'] as AnyObjectId) def added = [] while (walk.next()) { added << walk.pathString diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/service/ResolveService.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/service/ResolveService.groovy index 07b223e..0dddba5 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/service/ResolveService.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/service/ResolveService.groovy @@ -138,11 +138,11 @@ class ResolveService { */ Tag toTag(Object object) { if (object == null) { - return object + return object as Tag } else if (object instanceof Tag) { return object } else if (object instanceof String || object instanceof GString) { - GitUtil.resolveTag(repository, object) + GitUtil.resolveTag(repository, object as String) } else { throwIllegalArgument(object) } diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/util/GitUtil.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/util/GitUtil.groovy index 2a21b8b..1b97296 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/util/GitUtil.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/util/GitUtil.groovy @@ -68,7 +68,7 @@ class GitUtil { RevCommit rev = walk.parseCommit(id) return rev.parents.collect { walk.parseCommit(it) - } + } as Set } /** @@ -126,7 +126,7 @@ class GitUtil { * @return the resolved tag */ static Tag resolveTag(Repository repo, String name) { - Ref ref = repo.jgit.repository.getRef(name) + Ref ref = repo.jgit.repository.getRefDatabase().findRef(name) return resolveTag(repo, ref) } @@ -144,7 +144,7 @@ class GitUtil { RevTag rev = walk.parseTag(ref.objectId) RevObject target = walk.peel(rev) walk.parseBody(rev.object) - props.commit = convertCommit(repo, target) + props.commit = convertCommit(repo, target as RevCommit) PersonIdent tagger = rev.taggerIdent props.tagger = new Person(tagger.name, tagger.emailAddress) props.fullMessage = rev.fullMessage @@ -185,7 +185,7 @@ class GitUtil { } Map props = [:] props.fullName = ref.name - String shortName = org.eclipse.jgit.lib.Repository.shortenRefName(props.fullName) + String shortName = org.eclipse.jgit.lib.Repository.shortenRefName(props['fullName'] as String) Config config = repo.jgit.repository.config BranchConfig branchConfig = new BranchConfig(config, shortName) if (branchConfig.trackingBranch) { diff --git a/groovy-ldap/build.gradle b/groovy-ldap/build.gradle index 603972d..ec19562 100644 --- a/groovy-ldap/build.gradle +++ b/groovy-ldap/build.gradle @@ -1,6 +1 @@ -apply from: rootProject.file('gradle/compile/groovy.gradle') - -dependencies { - testImplementation "org.apache.groovy:groovy:${project.property('groovy.version')}" - testImplementation "junit:junit:${project.property('junit4.version')}" -} +apply from: rootProject.file('gradle/compile/groovy-dynamic-tests.gradle') diff --git a/groovy-ldap/gradle.properties b/groovy-ldap/gradle.properties new file mode 100644 index 0000000..543c1fe --- /dev/null +++ b/groovy-ldap/gradle.properties @@ -0,0 +1 @@ +version = 4.0.0 diff --git a/groovy-ldap/src/test/java/org/xbib/groovy/ldap/JavaSearchTest.java b/groovy-ldap/src/test/java/org/xbib/groovy/ldap/JavaSearchTest.java index 7281def..2294cb8 100644 --- a/groovy-ldap/src/test/java/org/xbib/groovy/ldap/JavaSearchTest.java +++ b/groovy-ldap/src/test/java/org/xbib/groovy/ldap/JavaSearchTest.java @@ -1,8 +1,7 @@ package org.xbib.groovy.ldap; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; public class JavaSearchTest { diff --git a/groovy-mail/build.gradle b/groovy-mail/build.gradle index f37d65f..b18a920 100644 --- a/groovy-mail/build.gradle +++ b/groovy-mail/build.gradle @@ -1,5 +1,5 @@ apply from: rootProject.file('gradle/compile/groovy.gradle') dependencies { - api "com.sun.mail:javax.mail:${project.property('mail.version')}" + api libs.mail } diff --git a/groovy-mail/gradle.properties b/groovy-mail/gradle.properties new file mode 100644 index 0000000..543c1fe --- /dev/null +++ b/groovy-mail/gradle.properties @@ -0,0 +1 @@ +version = 4.0.0 diff --git a/groovy-sshd/build.gradle b/groovy-sshd/build.gradle index 4363b9e..74ab3cd 100644 --- a/groovy-sshd/build.gradle +++ b/groovy-sshd/build.gradle @@ -1,5 +1,5 @@ apply from: rootProject.file('gradle/compile/groovy.gradle') dependencies { - api "org.xbib:files-sftp-fs:${project.property('files.version')}" + api libs.files.sftp.fs } diff --git a/groovy-sshd/gradle.properties b/groovy-sshd/gradle.properties new file mode 100644 index 0000000..543c1fe --- /dev/null +++ b/groovy-sshd/gradle.properties @@ -0,0 +1 @@ +version = 4.0.0 diff --git a/settings.gradle b/settings.gradle index 53017c0..7a2d8ce 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,8 +1,31 @@ -include 'groovy-ldap' +dependencyResolutionManagement { + versionCatalogs { + libs { + version('gradle', '7.4.2') + version('groovy', '4.0.3') + version('spock', '2.2-M1-groovy-4.0') + version('junit', '5.8.2') + library('groovy-core', 'org.apache.groovy', 'groovy').versionRef('groovy') + library('spock-core', 'org.spockframework', 'spock-core').versionRef('spock') + library('spock-junit4', 'org.spockframework', 'spock-junit4').versionRef('spock') + library('junit-jupiter-api', 'org.junit.jupiter', 'junit-jupiter-api').versionRef('junit') + library('junit-jupiter-params', 'org.junit.jupiter', 'junit-jupiter-params').versionRef('junit') + library('junit-jupiter-engine', 'org.junit.jupiter', 'junit-jupiter-engine').versionRef('junit') + library('junit4', 'junit', 'junit').version('4.13.2') + library('hamcrest', 'org.hamcrest', 'hamcrest-library').version('2.2') + library('ftp-fs', 'org.xbib', 'ftp-fs').version('2.6.0') + library('files-sftp-fs', 'org.xbib', 'files-sftp-fs').version('3.0.0') + library('jgit', 'org.eclipse.jgit', 'org.eclipse.jgit').version('6.2.0.202206071550-r') + library('mail', 'com.sun.mail', 'javax.mail').version('1.6.2') + } + } +} + include 'groovy-crypt' -include 'groovy-mail' include 'groovy-ftp' include 'groovy-ftps' -include 'groovy-sshd' include 'groovy-git' +include 'groovy-ldap' +include 'groovy-mail' +include 'groovy-sshd'