diff --git a/build.gradle b/build.gradle index d9cef1b..7852b0d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,13 @@ + plugins { - id "de.marcphilipp.nexus-publish" version "0.4.0" - id "io.codearte.nexus-staging" version "0.21.1" + id "checkstyle" + id "pmd" + id 'maven-publish' + id 'signing' + id "io.github.gradle-nexus.publish-plugin" version "1.3.0" + id "com.github.spotbugs" version "5.0.14" + id "org.cyclonedx.bom" version "1.7.2" + id "org.xbib.gradle.plugin.asciidoctor" version "2.5.2.2" } wrapper { @@ -24,11 +31,10 @@ ext { } subprojects { - apply plugin: 'java-library' apply from: rootProject.file('gradle/ide/idea.gradle') apply from: rootProject.file('gradle/compile/java.gradle') apply from: rootProject.file('gradle/test/junit5.gradle') apply from: rootProject.file('gradle/repositories/maven.gradle') - apply from: rootProject.file('gradle/publishing/publication.gradle') + apply from: rootProject.file('gradle/publish/maven.gradle') } -apply from: rootProject.file('gradle/publishing/sonatype.gradle') +apply from: rootProject.file('gradle/publish/sonatype.gradle') diff --git a/gradle.properties b/gradle.properties index df975fd..35874ca 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,14 +1,5 @@ group = org.xbib.groovy name = groovy-extensions -version = 4.0.3.0 +version = 4.0.12.0 org.gradle.warning.mode = ALL -groovy.version = 2.5.12 -gradle.wrapper.version = 7.3 -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.0-groovy-2.5 diff --git a/gradle/compile/groovy-dynamic-tests.gradle b/gradle/compile/groovy-dynamic-tests.gradle index 4efae2b..a60c936 100644 --- a/gradle/compile/groovy-dynamic-tests.gradle +++ b/gradle/compile/groovy-dynamic-tests.gradle @@ -27,3 +27,10 @@ task groovydocJar(type: Jar, dependsOn: 'groovydoc') { from groovydoc.destinationDir archiveClassifier.set('javadoc') } + +sourceSets { + main { + java { srcDirs = [] } + groovy { srcDirs += ['src/main/java'] } + } +} diff --git a/gradle/compile/groovy.gradle b/gradle/compile/groovy.gradle index 1635f24..2a946e5 100644 --- a/gradle/compile/groovy.gradle +++ b/gradle/compile/groovy.gradle @@ -34,3 +34,10 @@ tasks.assemble.dependsOn(tasks.groovydocJar) artifacts { archives groovydocJar } + +sourceSets { + main { + java { srcDirs = [] } + groovy { srcDirs += ['src/main/java'] } + } +} diff --git a/gradle/compile/java.gradle b/gradle/compile/java.gradle index 72bbbbe..a37f057 100644 --- a/gradle/compile/java.gradle +++ b/gradle/compile/java.gradle @@ -3,6 +3,8 @@ apply plugin: 'java-library' java { modularity.inferModulePath.set(true) + withSourcesJar() + withJavadocJar() } compileJava { @@ -21,22 +23,6 @@ jar { } } -task sourcesJar(type: Jar) { - dependsOn classes - classifier 'sources' - from sourceSets.main.allSource -} - -task javadocJar(type: Jar) { - dependsOn javadoc - classifier 'javadoc' - from javadoc.destinationDir -} - -artifacts { - archives sourcesJar, javadocJar -} - tasks.withType(JavaCompile) { options.compilerArgs << '-Xlint:all,-fallthrough' } diff --git a/gradle/publish/ivy.gradle b/gradle/publish/ivy.gradle new file mode 100644 index 0000000..fe0a848 --- /dev/null +++ b/gradle/publish/ivy.gradle @@ -0,0 +1,27 @@ +apply plugin: 'ivy-publish' + +publishing { + repositories { + ivy { + url = "https://xbib.org/repo" + } + } + publications { + ivy(IvyPublication) { + from components.java + descriptor { + license { + name = 'The Apache License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + author { + name = 'Jörg Prante' + url = 'http://example.com/users/jane' + } + descriptor.description { + text = rootProject.ext.description + } + } + } + } +} \ No newline at end of file diff --git a/gradle/publishing/publication.gradle b/gradle/publish/maven.gradle similarity index 75% rename from gradle/publishing/publication.gradle rename to gradle/publish/maven.gradle index 2e2b2c0..ce6a26f 100644 --- a/gradle/publishing/publication.gradle +++ b/gradle/publish/maven.gradle @@ -1,13 +1,10 @@ -apply plugin: "de.marcphilipp.nexus-publish" - publishing { publications { - mavenJava(MavenPublication) { + "${project.name}"(MavenPublication) { from components.java - artifact sourcesJar - artifact javadocJar pom { + artifactId = project.name name = project.name description = rootProject.ext.description url = rootProject.ext.url @@ -49,18 +46,6 @@ publishing { if (project.hasProperty("signing.keyId")) { apply plugin: 'signing' signing { - sign publishing.publications.mavenJava - } -} - -if (project.hasProperty("ossrhUsername")) { - nexusPublishing { - repositories { - sonatype { - username = project.property('ossrhUsername') - password = project.property('ossrhPassword') - packageGroup = "org.xbib" - } - } + sign publishing.publications."${project.name}" } } diff --git a/gradle/publish/sonatype.gradle b/gradle/publish/sonatype.gradle new file mode 100644 index 0000000..5d739de --- /dev/null +++ b/gradle/publish/sonatype.gradle @@ -0,0 +1,11 @@ +if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) { + nexusPublishing { + repositories { + sonatype { + username = project.property('ossrhUsername') + password = project.property('ossrhPassword') + packageGroup = "org.xbib" + } + } + } +} diff --git a/gradle/publishing/sonatype.gradle b/gradle/publishing/sonatype.gradle deleted file mode 100644 index e1813f3..0000000 --- a/gradle/publishing/sonatype.gradle +++ /dev/null @@ -1,11 +0,0 @@ - -if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) { - - apply plugin: 'io.codearte.nexus-staging' - - nexusStaging { - username = project.property('ossrhUsername') - password = project.property('ossrhPassword') - packageGroup = "org.xbib" - } -} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 92f06b5..1f017e4 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.4.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/groovy-git-annotations/build.gradle b/groovy-git-annotations/build.gradle new file mode 100644 index 0000000..91b89c2 --- /dev/null +++ b/groovy-git-annotations/build.gradle @@ -0,0 +1,2 @@ +apply from: rootProject.file('gradle/compile/groovy-dynamic-tests.gradle') + diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/AnnotateAtRuntime.java b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/AnnotateAtRuntime.java similarity index 73% rename from groovy-git/src/main/groovy/org/xbib/groovy/git/internal/AnnotateAtRuntime.java rename to groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/AnnotateAtRuntime.java index bf74e20..792dce3 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/AnnotateAtRuntime.java +++ b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/AnnotateAtRuntime.java @@ -1,4 +1,4 @@ -package org.xbib.groovy.git.internal; +package org.xbib.groovy.git.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -9,7 +9,7 @@ import org.codehaus.groovy.transform.GroovyASTTransformationClass; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) -@GroovyASTTransformationClass("org.xbib.groovy.git.internal.AnnotateAtRuntimeASTTransformation") +@GroovyASTTransformationClass(classes = {AnnotateAtRuntimeASTTransformation.class}) public @interface AnnotateAtRuntime { String[] annotations() default {}; } diff --git a/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/AnnotateAtRuntimeASTTransformation.java b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/AnnotateAtRuntimeASTTransformation.java new file mode 100644 index 0000000..1babdd2 --- /dev/null +++ b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/AnnotateAtRuntimeASTTransformation.java @@ -0,0 +1,32 @@ +package org.xbib.groovy.git.annotations; + +import java.util.List; + +import org.codehaus.groovy.ast.ASTNode; +import org.codehaus.groovy.ast.AnnotatedNode; +import org.codehaus.groovy.ast.AnnotationNode; +import org.codehaus.groovy.ast.ClassNode; +import org.codehaus.groovy.control.SourceUnit; +import org.codehaus.groovy.transform.AbstractASTTransformation; +import org.codehaus.groovy.transform.GroovyASTTransformation; + +@GroovyASTTransformation +public final class AnnotateAtRuntimeASTTransformation extends AbstractASTTransformation { + @Override + public void visit(ASTNode[] nodes, SourceUnit source) { + AnnotationNode annotation = (AnnotationNode) nodes[0]; + AnnotatedNode parent = (AnnotatedNode) nodes[1]; + + ClassNode clazz = (ClassNode) parent; + List annotations = getMemberStringList(annotation, "annotations"); + for (String name : annotations) { + // !!! UGLY HACK !!! + // Groovy won't think the class is an annotation when creating a ClassNode just based on the name. + // Instead, we create a node based on an interface and then overwrite the name to get the interface + // we actually want. + ClassNode base = new ClassNode(FunctionalInterface.class); + base.setName(name); + clazz.addAnnotation(new AnnotationNode(base)); + } + } +} diff --git a/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/Configurable.java b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/Configurable.java new file mode 100644 index 0000000..8da2748 --- /dev/null +++ b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/Configurable.java @@ -0,0 +1,7 @@ +package org.xbib.groovy.git.annotations; + +@FunctionalInterface +@AnnotateAtRuntime(annotations = "org.gradle.api.HasImplicitReceiver") +public interface Configurable { + void configure(T t); +} diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/OpSyntax.groovy b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/OpSyntax.groovy similarity index 93% rename from groovy-git/src/main/groovy/org/xbib/groovy/git/internal/OpSyntax.groovy rename to groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/OpSyntax.groovy index 4d15e8f..0bfd8e8 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/OpSyntax.groovy +++ b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/OpSyntax.groovy @@ -1,9 +1,7 @@ -package org.xbib.groovy.git.internal +package org.xbib.groovy.git.annotations; import java.util.concurrent.Callable -import org.xbib.groovy.git.Configurable - class OpSyntax { static def noArgOperation(Class opClass, Object[] classArgs) { def op = opClass.newInstance(classArgs) diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/Operation.java b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/Operation.java similarity index 81% rename from groovy-git/src/main/groovy/org/xbib/groovy/git/internal/Operation.java rename to groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/Operation.java index 260e4dc..7e9c92c 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/Operation.java +++ b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/Operation.java @@ -1,4 +1,4 @@ -package org.xbib.groovy.git.internal; +package org.xbib.groovy.git.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -8,5 +8,5 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) public @interface Operation { - String value(); + String value(); } diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/WithOperations.java b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/WithOperations.java similarity index 79% rename from groovy-git/src/main/groovy/org/xbib/groovy/git/internal/WithOperations.java rename to groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/WithOperations.java index 1ecde51..7b6c610 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/WithOperations.java +++ b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/WithOperations.java @@ -1,4 +1,4 @@ -package org.xbib.groovy.git.internal; +package org.xbib.groovy.git.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -10,7 +10,7 @@ import org.codehaus.groovy.transform.GroovyASTTransformationClass; @Retention(RetentionPolicy.SOURCE) @Target(ElementType.TYPE) -@GroovyASTTransformationClass("org.xbib.groovy.git.internal.WithOperationsASTTransformation") +@GroovyASTTransformationClass(classes = {WithOperationsASTTransformation.class}) public @interface WithOperations { Class>[] staticOperations() default {}; diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/WithOperationsASTTransformation.java b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/WithOperationsASTTransformation.java similarity index 96% rename from groovy-git/src/main/groovy/org/xbib/groovy/git/internal/WithOperationsASTTransformation.java rename to groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/WithOperationsASTTransformation.java index df5fc05..8d89603 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/WithOperationsASTTransformation.java +++ b/groovy-git-annotations/src/main/groovy/org/xbib/groovy/git/annotations/WithOperationsASTTransformation.java @@ -1,4 +1,4 @@ -package org.xbib.groovy.git.internal; +package org.xbib.groovy.git.annotations; import java.lang.reflect.Modifier; import java.lang.reflect.ParameterizedType; @@ -9,12 +9,12 @@ import java.util.List; import java.util.Map; import groovy.lang.Closure; -import org.xbib.groovy.git.Configurable; import org.codehaus.groovy.ast.ASTNode; import org.codehaus.groovy.ast.AnnotatedNode; import org.codehaus.groovy.ast.AnnotationNode; import org.codehaus.groovy.ast.ClassHelper; import org.codehaus.groovy.ast.ClassNode; +import org.codehaus.groovy.ast.FieldNode; import org.codehaus.groovy.ast.GenericsType; import org.codehaus.groovy.ast.MethodNode; import org.codehaus.groovy.ast.Parameter; @@ -163,14 +163,15 @@ public class WithOperationsASTTransformation extends AbstractASTTransformation { return Arrays.stream(types) .map(this::classFromType) .map(GenericsType::new) - .toArray(GenericsType[]::new); + .toArray(size -> new GenericsType[size]); } public List opConstructorParms(ClassNode targetClass, boolean isStatic) { if (isStatic) { return Collections.emptyList(); } else { - return Collections.singletonList(new FieldExpression(targetClass.getField("repository"))); + FieldNode repo = targetClass.getField("repository"); + return Arrays.asList(new FieldExpression(repo)); } } diff --git a/groovy-git/build.gradle b/groovy-git/build.gradle index 498767d..97a2234 100644 --- a/groovy-git/build.gradle +++ b/groovy-git/build.gradle @@ -1,6 +1,7 @@ apply from: rootProject.file('gradle/compile/groovy-dynamic-tests.gradle') dependencies { + api project(':groovy-git-annotations') api libs.jgit testImplementation libs.spock.core testImplementation libs.spock.junit4 diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/Configurable.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/Configurable.groovy deleted file mode 100644 index 141e1cf..0000000 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/Configurable.groovy +++ /dev/null @@ -1,9 +0,0 @@ -package org.xbib.groovy.git - -import org.xbib.groovy.git.internal.AnnotateAtRuntime - -@FunctionalInterface -@AnnotateAtRuntime(annotations = "org.gradle.api.HasImplicitReceiver") -interface Configurable { - void configure(T t) -} diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/Git.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/Git.groovy index cfade76..ce533f3 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/Git.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/Git.groovy @@ -1,6 +1,6 @@ package org.xbib.groovy.git -import org.xbib.groovy.git.internal.WithOperations +import org.xbib.groovy.git.annotations.WithOperations import org.xbib.groovy.git.operation.AddOp import org.xbib.groovy.git.operation.ApplyOp import org.xbib.groovy.git.operation.CheckoutOp diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/AnnotateAtRuntimeASTTransformation.java b/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/AnnotateAtRuntimeASTTransformation.java deleted file mode 100644 index ad89fa4..0000000 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/internal/AnnotateAtRuntimeASTTransformation.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.xbib.groovy.git.internal; - -import java.util.List; - -import org.codehaus.groovy.ast.ASTNode; -import org.codehaus.groovy.ast.AnnotatedNode; -import org.codehaus.groovy.ast.AnnotationNode; -import org.codehaus.groovy.ast.ClassNode; -import org.codehaus.groovy.control.SourceUnit; -import org.codehaus.groovy.transform.AbstractASTTransformation; -import org.codehaus.groovy.transform.GroovyASTTransformation; - -@GroovyASTTransformation -public final class AnnotateAtRuntimeASTTransformation extends AbstractASTTransformation { - @Override - public void visit(ASTNode[] nodes, SourceUnit source) { - AnnotationNode annotation = (AnnotationNode) nodes[0]; - AnnotatedNode parent = (AnnotatedNode) nodes[1]; - - ClassNode clazz = (ClassNode) parent; - List annotations = getMemberStringList(annotation, "annotations"); - for (String name : annotations) { - // !!! UGLY HACK !!! - // Groovy won't think the class is an annotation when creating a ClassNode just based on the name. - // Instead, we create a node based on an interface and then overwrite the name to get the interface - // we actually want. - ClassNode base = new ClassNode(FunctionalInterface.class); - base.setName(name); - - clazz.addAnnotation(new AnnotationNode(base)); - } - } -} - diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/AddOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/AddOp.groovy index bcdab08..789c00f 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/AddOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/AddOp.groovy @@ -1,9 +1,10 @@ package org.xbib.groovy.git.operation +import org.xbib.groovy.git.annotations.Operation + import java.util.concurrent.Callable import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation import org.eclipse.jgit.api.AddCommand /** diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/ApplyOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/ApplyOp.groovy index e0845c8..9d3259f 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/ApplyOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/ApplyOp.groovy @@ -3,7 +3,7 @@ package org.xbib.groovy.git.operation import java.util.concurrent.Callable import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.util.CoercionUtil import org.eclipse.jgit.api.ApplyCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchAddOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchAddOp.groovy index 89e1778..01eaa09 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchAddOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchAddOp.groovy @@ -5,7 +5,7 @@ import org.eclipse.jgit.api.CreateBranchCommand.SetupUpstreamMode import org.eclipse.jgit.lib.Ref import org.xbib.groovy.git.Branch import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.xbib.groovy.git.util.GitUtil diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchChangeOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchChangeOp.groovy index 0d61677..22ada1b 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchChangeOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchChangeOp.groovy @@ -4,7 +4,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.Branch import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.xbib.groovy.git.util.GitUtil import org.eclipse.jgit.api.CreateBranchCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchListOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchListOp.groovy index f616b54..3f73776 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchListOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchListOp.groovy @@ -4,7 +4,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.Branch import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.xbib.groovy.git.util.GitUtil import org.eclipse.jgit.api.ListBranchCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchRemoveOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchRemoveOp.groovy index d4fc151..60c40c5 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchRemoveOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchRemoveOp.groovy @@ -3,7 +3,7 @@ package org.xbib.groovy.git.operation import java.util.concurrent.Callable import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.eclipse.jgit.api.DeleteBranchCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchStatusOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchStatusOp.groovy index 78710c0..c82e2f7 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchStatusOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/BranchStatusOp.groovy @@ -5,7 +5,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.Branch import org.xbib.groovy.git.BranchStatus import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.eclipse.jgit.lib.BranchTrackingStatus diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CheckoutOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CheckoutOp.groovy index 99d9a3d..0d8d178 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CheckoutOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CheckoutOp.groovy @@ -3,7 +3,7 @@ package org.xbib.groovy.git.operation import java.util.concurrent.Callable import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.eclipse.jgit.api.CheckoutCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CleanOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CleanOp.groovy index 49230b5..0b0e2ca 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CleanOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CleanOp.groovy @@ -3,7 +3,7 @@ package org.xbib.groovy.git.operation import java.util.concurrent.Callable import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.eclipse.jgit.api.CleanCommand /** diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CloneOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CloneOp.groovy index 85b9901..34a8dcc 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CloneOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CloneOp.groovy @@ -7,7 +7,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.Credentials import org.xbib.groovy.git.Repository import org.xbib.groovy.git.auth.TransportOpUtil -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.util.CoercionUtil import org.eclipse.jgit.api.CloneCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CommitOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CommitOp.groovy index 2352918..d1be4e4 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CommitOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/CommitOp.groovy @@ -5,7 +5,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.Commit import org.xbib.groovy.git.Person import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.util.GitUtil import org.eclipse.jgit.api.CommitCommand import org.eclipse.jgit.lib.PersonIdent diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/DescribeOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/DescribeOp.groovy index d46bb01..03a7523 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/DescribeOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/DescribeOp.groovy @@ -3,7 +3,7 @@ package org.xbib.groovy.git.operation import java.util.concurrent.Callable import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.eclipse.jgit.api.DescribeCommand 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 b2af5c6..f8b30d0 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 @@ -4,7 +4,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.Repository import org.xbib.groovy.git.auth.TransportOpUtil -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.eclipse.jgit.api.FetchCommand import org.eclipse.jgit.transport.RefSpec import org.eclipse.jgit.transport.TagOpt diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/InitOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/InitOp.groovy index ced3194..5e2ba19 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/InitOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/InitOp.groovy @@ -3,7 +3,7 @@ package org.xbib.groovy.git.operation import org.xbib.groovy.git.Git import java.util.concurrent.Callable import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.util.CoercionUtil import org.eclipse.jgit.api.InitCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/LogOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/LogOp.groovy index af92473..3d82a15 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/LogOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/LogOp.groovy @@ -3,7 +3,7 @@ package org.xbib.groovy.git.operation import java.util.concurrent.Callable import org.xbib.groovy.git.Commit import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.xbib.groovy.git.util.GitUtil import org.eclipse.jgit.api.LogCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/LsRemoteOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/LsRemoteOp.groovy index a40766f..2c74a73 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/LsRemoteOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/LsRemoteOp.groovy @@ -4,7 +4,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.Ref import org.xbib.groovy.git.Repository import org.xbib.groovy.git.auth.TransportOpUtil -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.eclipse.jgit.api.LsRemoteCommand import org.eclipse.jgit.lib.ObjectId 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 2c7b064..fab45da 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 @@ -4,7 +4,7 @@ import org.eclipse.jgit.lib.Ref import java.util.concurrent.Callable import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.xbib.groovy.git.util.GitUtil import org.eclipse.jgit.api.MergeCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/OpenOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/OpenOp.groovy index 645f8bf..e9cd27d 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/OpenOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/OpenOp.groovy @@ -4,7 +4,7 @@ import org.xbib.groovy.git.Git import java.util.concurrent.Callable import org.xbib.groovy.git.Credentials import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.util.CoercionUtil import org.eclipse.jgit.storage.file.FileRepositoryBuilder diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/PullOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/PullOp.groovy index 9e6bf8d..83f7e78 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/PullOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/PullOp.groovy @@ -4,7 +4,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.Repository import org.xbib.groovy.git.auth.TransportOpUtil -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.eclipse.jgit.api.PullCommand import org.eclipse.jgit.api.PullResult 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 12e6547..2b89c5b 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 @@ -6,7 +6,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.PushException import org.xbib.groovy.git.Repository import org.xbib.groovy.git.auth.TransportOpUtil -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.eclipse.jgit.api.PushCommand import org.eclipse.jgit.transport.RemoteRefUpdate 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 69bdfe6..7e4059e 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 @@ -3,7 +3,7 @@ package org.xbib.groovy.git.operation import java.util.concurrent.Callable import org.xbib.groovy.git.Remote import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.util.GitUtil import org.eclipse.jgit.lib.Config import org.eclipse.jgit.transport.RefSpec diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RemoteListOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RemoteListOp.groovy index 870fe5b..24c02a7 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RemoteListOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RemoteListOp.groovy @@ -4,7 +4,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.Repository import org.xbib.groovy.git.Remote -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.util.GitUtil import org.eclipse.jgit.transport.RemoteConfig diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/ResetOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/ResetOp.groovy index 1c3104e..2ea9c82 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/ResetOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/ResetOp.groovy @@ -3,7 +3,7 @@ package org.xbib.groovy.git.operation import java.util.concurrent.Callable import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.eclipse.jgit.api.ResetCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RevertOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RevertOp.groovy index 122b57b..b686c5e 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RevertOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RevertOp.groovy @@ -4,7 +4,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.Commit import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.xbib.groovy.git.util.GitUtil import org.eclipse.jgit.api.RevertCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RmOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RmOp.groovy index c93186d..161ddac 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RmOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/RmOp.groovy @@ -3,7 +3,7 @@ package org.xbib.groovy.git.operation import java.util.concurrent.Callable import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.eclipse.jgit.api.RmCommand /** 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 b9658a1..87369ce 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 @@ -6,7 +6,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.CommitDiff import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.xbib.groovy.git.util.GitUtil import org.eclipse.jgit.diff.DiffEntry diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/StatusOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/StatusOp.groovy index fcb3ae6..e3fdd99 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/StatusOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/StatusOp.groovy @@ -4,7 +4,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.Repository import org.xbib.groovy.git.Status -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.util.GitUtil import org.eclipse.jgit.api.StatusCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/TagAddOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/TagAddOp.groovy index 0dff748..7abcac9 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/TagAddOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/TagAddOp.groovy @@ -4,7 +4,7 @@ import java.util.concurrent.Callable import org.xbib.groovy.git.Person import org.xbib.groovy.git.Repository import org.xbib.groovy.git.Tag -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.xbib.groovy.git.util.GitUtil import org.eclipse.jgit.api.TagCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/TagListOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/TagListOp.groovy index 0a4d30a..0eea541 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/TagListOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/TagListOp.groovy @@ -3,7 +3,7 @@ package org.xbib.groovy.git.operation import java.util.concurrent.Callable import org.xbib.groovy.git.Repository import org.xbib.groovy.git.Tag -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.util.GitUtil import org.eclipse.jgit.api.ListTagCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/TagRemoveOp.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/TagRemoveOp.groovy index 99f086e..9fd0dd2 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/TagRemoveOp.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/operation/TagRemoveOp.groovy @@ -2,7 +2,7 @@ package org.xbib.groovy.git.operation import java.util.concurrent.Callable import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.Operation +import org.xbib.groovy.git.annotations.Operation import org.xbib.groovy.git.service.ResolveService import org.eclipse.jgit.api.DeleteTagCommand diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/service/BranchService.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/service/BranchService.groovy index 51a33e7..c65224a 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/service/BranchService.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/service/BranchService.groovy @@ -2,7 +2,7 @@ package org.xbib.groovy.git.service import org.xbib.groovy.git.Branch import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.WithOperations +import org.xbib.groovy.git.annotations.WithOperations import org.xbib.groovy.git.operation.BranchAddOp import org.xbib.groovy.git.operation.BranchChangeOp import org.xbib.groovy.git.operation.BranchListOp diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/service/RemoteService.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/service/RemoteService.groovy index 6f93517..8727fe8 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/service/RemoteService.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/service/RemoteService.groovy @@ -1,7 +1,7 @@ package org.xbib.groovy.git.service import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.WithOperations +import org.xbib.groovy.git.annotations.WithOperations import org.xbib.groovy.git.operation.RemoteAddOp import org.xbib.groovy.git.operation.RemoteListOp diff --git a/groovy-git/src/main/groovy/org/xbib/groovy/git/service/TagService.groovy b/groovy-git/src/main/groovy/org/xbib/groovy/git/service/TagService.groovy index d6e6a6d..46fc4de 100644 --- a/groovy-git/src/main/groovy/org/xbib/groovy/git/service/TagService.groovy +++ b/groovy-git/src/main/groovy/org/xbib/groovy/git/service/TagService.groovy @@ -1,7 +1,7 @@ package org.xbib.groovy.git.service import org.xbib.groovy.git.Repository -import org.xbib.groovy.git.internal.WithOperations +import org.xbib.groovy.git.annotations.WithOperations import org.xbib.groovy.git.operation.TagAddOp import org.xbib.groovy.git.operation.TagListOp import org.xbib.groovy.git.operation.TagRemoveOp diff --git a/settings.gradle b/settings.gradle index 7a2d8ce..f34eb59 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,10 +2,10 @@ dependencyResolutionManagement { versionCatalogs { libs { - version('gradle', '7.4.2') - version('groovy', '4.0.3') + version('gradle', '8.1.1') + version('groovy', '4.0.12') version('spock', '2.2-M1-groovy-4.0') - version('junit', '5.8.2') + version('junit', '5.9.3') 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') @@ -25,6 +25,7 @@ dependencyResolutionManagement { include 'groovy-crypt' include 'groovy-ftp' include 'groovy-ftps' +include 'groovy-git-annotations' include 'groovy-git' include 'groovy-ldap' include 'groovy-mail'