update to Groovy 4.0.3
This commit is contained in:
parent
51a3af22bf
commit
1c9ce2a094
38 changed files with 570 additions and 84 deletions
|
@ -4,7 +4,7 @@ plugins {
|
|||
}
|
||||
|
||||
wrapper {
|
||||
gradleVersion = "${project.property('gradle.wrapper.version')}"
|
||||
gradleVersion = libs.versions.gradle.get()
|
||||
distributionType = Wrapper.DistributionType.ALL
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
29
gradle/compile/groovy-dynamic-tests.gradle
Normal file
29
gradle/compile/groovy-dynamic-tests.gradle
Normal file
|
@ -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')
|
||||
}
|
31
gradle/compile/groovy-dynamic.gradle
Normal file
31
gradle/compile/groovy-dynamic.gradle
Normal file
|
@ -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
|
||||
}
|
|
@ -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) {
|
||||
|
|
7
gradle/compile/groovyc.groovy
Normal file
7
gradle/compile/groovyc.groovy
Normal file
|
@ -0,0 +1,7 @@
|
|||
import groovy.transform.TypeChecked
|
||||
import groovy.transform.CompileStatic
|
||||
|
||||
withConfig(configuration) {
|
||||
ast(TypeChecked)
|
||||
ast(CompileStatic)
|
||||
}
|
|
@ -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'
|
||||
}
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
1
groovy-crypt/gradle.properties
Normal file
1
groovy-crypt/gradle.properties
Normal file
|
@ -0,0 +1 @@
|
|||
version = 4.0.0
|
|
@ -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)
|
||||
}
|
||||
|
|
202
groovy-ftp/LICENSE.txt
Normal file
202
groovy-ftp/LICENSE.txt
Normal file
|
@ -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.
|
|
@ -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
|
||||
}
|
||||
|
|
1
groovy-ftp/gradle.properties
Normal file
1
groovy-ftp/gradle.properties
Normal file
|
@ -0,0 +1 @@
|
|||
version = 4.0.0
|
202
groovy-ftps/LICENSE.txt
Normal file
202
groovy-ftps/LICENSE.txt
Normal file
|
@ -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.
|
|
@ -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
|
||||
}
|
||||
|
|
1
groovy-ftps/gradle.properties
Normal file
1
groovy-ftps/gradle.properties
Normal file
|
@ -0,0 +1 @@
|
|||
version = 4.0.0
|
|
@ -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
|
||||
}
|
||||
|
|
1
groovy-git/gradle.properties
Normal file
1
groovy-git/gradle.properties
Normal file
|
@ -0,0 +1 @@
|
|||
version = 4.0.0
|
|
@ -9,35 +9,35 @@ import groovy.transform.ToString
|
|||
@EqualsAndHashCode
|
||||
@ToString(includeNames=true)
|
||||
class Status {
|
||||
final Changes staged
|
||||
final Changes unstaged
|
||||
final Set<String> conflicts
|
||||
Changes staged
|
||||
Changes unstaged
|
||||
Set<String> 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<String> : [] as Set<String>
|
||||
}
|
||||
|
||||
@EqualsAndHashCode
|
||||
@ToString(includeNames=true)
|
||||
class Changes {
|
||||
final Set<String> added
|
||||
final Set<String> modified
|
||||
final Set<String> removed
|
||||
Set<String> added
|
||||
Set<String> modified
|
||||
Set<String> 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<String> : [] as Set<String>
|
||||
this.modified = 'modified' in args ? args['modified'] as Set<String> : [] as Set<String>
|
||||
this.removed = 'removed' in args ? args['removed'] as Set<String> : [] as Set<String>
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -53,7 +53,7 @@ class FetchOp implements Callable<Void> {
|
|||
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
|
||||
|
|
|
@ -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<Void> {
|
|||
* 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))
|
||||
|
|
|
@ -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<Void> {
|
|||
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()
|
||||
|
|
|
@ -60,10 +60,10 @@ class RemoteAddOp implements Callable<Remote> {
|
|||
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<Remote> {
|
|||
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<RefSpec>
|
||||
remote.pushRefSpecs = pushRefSpecs.collect(toRefSpec)
|
||||
remote.mirror = mirror
|
||||
remote.update(config)
|
||||
|
|
|
@ -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<CommitDiff> {
|
|||
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<CommitDiff> {
|
|||
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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ class GitUtil {
|
|||
RevCommit rev = walk.parseCommit(id)
|
||||
return rev.parents.collect {
|
||||
walk.parseCommit(it)
|
||||
}
|
||||
} as Set<ObjectId>
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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) {
|
||||
|
|
|
@ -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')
|
||||
|
|
1
groovy-ldap/gradle.properties
Normal file
1
groovy-ldap/gradle.properties
Normal file
|
@ -0,0 +1 @@
|
|||
version = 4.0.0
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
1
groovy-mail/gradle.properties
Normal file
1
groovy-mail/gradle.properties
Normal file
|
@ -0,0 +1 @@
|
|||
version = 4.0.0
|
|
@ -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
|
||||
}
|
||||
|
|
1
groovy-sshd/gradle.properties
Normal file
1
groovy-sshd/gradle.properties
Normal file
|
@ -0,0 +1 @@
|
|||
version = 4.0.0
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue