update to Java 17, Groovy 4
This commit is contained in:
parent
3301dbddec
commit
806b1722fa
14 changed files with 22 additions and 30 deletions
|
@ -1,9 +1,9 @@
|
|||
group = org.xbib.groovy
|
||||
name = groovy-extensions
|
||||
version = 0.0.2
|
||||
version = 4.0.0
|
||||
|
||||
org.gradle.warning.mode = ALL
|
||||
groovy.version = 2.5.12
|
||||
groovy.version = 4.0.0-rc-1
|
||||
gradle.wrapper.version = 7.3
|
||||
files.version = 3.0.0
|
||||
ftp.version = 2.6.0
|
||||
|
@ -11,4 +11,4 @@ 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
|
||||
spock.version = 2.0-groovy-3.0
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
apply plugin: 'groovy'
|
||||
|
||||
dependencies {
|
||||
implementation "org.codehaus.groovy:groovy:${project.property('groovy.version')}"
|
||||
implementation "org.apache.groovy:groovy:${project.property('groovy.version')}"
|
||||
}
|
||||
|
||||
compileGroovy {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
compileTestGroovy {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
tasks.withType(GroovyCompile) {
|
||||
|
|
|
@ -6,13 +6,13 @@ java {
|
|||
}
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
jar {
|
||||
|
|
|
@ -6,8 +6,3 @@ idea {
|
|||
testOutputDir file('build/classes/java/test')
|
||||
}
|
||||
}
|
||||
|
||||
if (project.convention.findPlugin(JavaPluginConvention)) {
|
||||
//sourceSets.main.output.classesDirs = file("build/classes/java/main")
|
||||
//sourceSets.test.output.classesDirs = file("build/classes/java/test")
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
version = 2.2.0
|
|
@ -1 +0,0 @@
|
|||
version = 2.6.0
|
|
@ -1 +0,0 @@
|
|||
version = 2.6.0
|
|
@ -2,7 +2,7 @@ apply from: rootProject.file('gradle/compile/groovy.gradle')
|
|||
|
||||
dependencies {
|
||||
api "org.eclipse.jgit:org.eclipse.jgit:${project.property('jgit.version')}"
|
||||
testImplementation "org.codehaus.groovy:groovy:${project.property('groovy.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')}"
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
version = 2.1.0
|
|
@ -18,7 +18,7 @@ public final class AnnotateAtRuntimeASTTransformation extends AbstractASTTransfo
|
|||
AnnotatedNode parent = (AnnotatedNode) nodes[1];
|
||||
|
||||
ClassNode clazz = (ClassNode) parent;
|
||||
List<String> annotations = getMemberList(annotation, "annotations");
|
||||
List<String> 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.
|
||||
|
|
|
@ -42,11 +42,15 @@ public class WithOperationsASTTransformation extends AbstractASTTransformation {
|
|||
|
||||
if (parent instanceof ClassNode) {
|
||||
ClassNode clazz = (ClassNode) parent;
|
||||
List<ClassNode> staticOps = getClassList(annotation, "staticOperations");
|
||||
List<ClassNode> instanceOps = getClassList(annotation, "instanceOperations");
|
||||
List<ClassNode> staticOps = getMemberClassList(annotation, "staticOperations");
|
||||
List<ClassNode> instanceOps = getMemberClassList(annotation, "instanceOperations");
|
||||
|
||||
staticOps.forEach(op -> makeMethods(clazz, op, true));
|
||||
instanceOps.forEach(op -> makeMethods(clazz, op, false));
|
||||
if (staticOps != null) {
|
||||
staticOps.forEach(op -> makeMethods(clazz, op, true));
|
||||
}
|
||||
if (instanceOps != null) {
|
||||
instanceOps.forEach(op -> makeMethods(clazz, op, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
version = 2.2.0
|
|
@ -1 +0,0 @@
|
|||
version = 2.2.0
|
|
@ -1 +0,0 @@
|
|||
version = 3.0.0.0
|
Loading…
Reference in a new issue