You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2025/01/02 21:23:42 UTC
(groovy) branch GROOVY_4_0_X updated (e8674eb673 -> 7099366117)
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a change to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
from e8674eb673 update dependency metadata
new b3dccbdf0f minor refactor: use later gradle syntax
new d347bc76ae minor refactor: use later gradle syntax
new eeab52f19c minor refactor: later gradle syntax
new 7099366117 minor refactor: later gradle syntax
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../src/main/groovy/org.apache.groovy-base.gradle | 60 ++++++++++++----------
.../src/main/groovy/org.apache.groovy-core.gradle | 6 ++-
.../groovy/org.apache.groovy-distribution.gradle | 4 +-
.../main/groovy/org.apache.groovy-internal.gradle | 3 +-
.../groovy/org.apache.groovy-performance.gradle | 2 +-
.../org.apache.groovy-published-library.gradle | 14 ++---
subprojects/groovy-binary/build.gradle | 4 +-
7 files changed, 50 insertions(+), 43 deletions(-)
(groovy) 04/04: minor refactor: later gradle syntax
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 7099366117b06f09cb8426f95a823caf1a7ebc59
Author: Paul King <pa...@asert.com.au>
AuthorDate: Fri Jan 3 07:23:15 2025 +1000
minor refactor: later gradle syntax
---
.../src/main/groovy/org.apache.groovy-base.gradle | 56 ++++++++++++----------
1 file changed, 30 insertions(+), 26 deletions(-)
diff --git a/build-logic/src/main/groovy/org.apache.groovy-base.gradle b/build-logic/src/main/groovy/org.apache.groovy-base.gradle
index 94ac9b845a..602c8eee8c 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-base.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-base.gradle
@@ -133,13 +133,14 @@ dependencies {
spotbugs "com.github.spotbugs:spotbugs:${versions.spotbugs}"
spotbugs "org.apache.logging.log4j:log4j-api:${versions.log4j2}"
spotbugs "org.apache.logging.log4j:log4j-core:${versions.log4j2}"
+ spotbugsSlf4j "org.slf4j:slf4j-simple:${versions.slf4j}"
}
def excludedFromManifest = [
- 'Ant-Version',
- 'Originally-Created-By',
- 'Bnd-LastModified',
- 'Created-By'
+ 'Ant-Version',
+ 'Originally-Created-By',
+ 'Bnd-LastModified',
+ 'Created-By'
]
tasks.named('jar') {
@@ -186,22 +187,22 @@ tasks.register("jarjar", JarJarTask) {
}
}.files
untouchedFiles = [
- 'groovy/cli/picocli/CliBuilder*.class',
- 'groovy/cli/picocli/OptionAccessor*.class'
+ 'groovy/cli/picocli/CliBuilder*.class',
+ 'groovy/cli/picocli/OptionAccessor*.class'
]
patterns = [
- 'org.antlr.**': 'groovyjarjarantlr4.@1', // antlr4
- 'org.objectweb.**': 'groovyjarjarasm.@1',
- 'picocli.**': 'groovyjarjarpicocli.@1'
+ 'org.antlr.**': 'groovyjarjarantlr4.@1', // antlr4
+ 'org.objectweb.**': 'groovyjarjarasm.@1',
+ 'picocli.**': 'groovyjarjarpicocli.@1'
]
excludesPerLibrary = [
- '*': ['META-INF/maven/**', 'META-INF/*', 'META-INF/services/javax.annotation.processing.Processor', '**/module-info.class']
+ '*': ['META-INF/maven/**', 'META-INF/*', 'META-INF/services/javax.annotation.processing.Processor', '**/module-info.class']
]
includesPerLibrary = [
- 'asm-util': ['org/objectweb/asm/util/Printer.class',
- 'org/objectweb/asm/util/Textifier*',
- 'org/objectweb/asm/util/ASMifier.class',
- 'org/objectweb/asm/util/Trace*']
+ 'asm-util': ['org/objectweb/asm/util/Printer.class',
+ 'org/objectweb/asm/util/Textifier*',
+ 'org/objectweb/asm/util/ASMifier.class',
+ 'org/objectweb/asm/util/Trace*']
]
outputFile = tasks.named('jar').flatMap { layout.buildDirectory.file("libs/${it.archiveBaseName.get()}-${it.archiveVersion.get()}${(it.archiveClassifier.get() && it.archiveClassifier.get() != 'raw') ? '-' + it.archiveClassifier.get() : ''}.jar") }
@@ -223,6 +224,10 @@ tasks.withType(Javadoc).configureEach {
options.source = sharedConfiguration.targetJavaVersion.get()
}
+tasks.named("compileTestGroovy") {
+ options.forkOptions.jvmArgs += ["-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true"]
+}
+
tasks.withType(CodeNarc).configureEach {
ignoreFailures = true
configFile = rootProject.file("config/codenarc/codenarc.groovy")
@@ -248,7 +253,7 @@ tasks.register("checkstyle") {
dependsOn tasks.withType(Checkstyle)
}
-tasks.withType(Checkstyle).configureEach {
+tasks.withType(Checkstyle).configureEach {chk ->
showViolations = false
ignoreFailures = true
configFile = rootProject.file("config/checkstyle/checkstyle.xml")
@@ -257,10 +262,9 @@ tasks.withType(Checkstyle).configureEach {
reports {
include('**/*.java')
xml {
- destination reportFile.get().asFile
+ outputLocation = reportFile
}
}
- def chk = it
finalizedBy {
// we use a closure here as a workaround, to preserve task configuration laziness
tasks.register("${name}Report", CheckstyleHtmlReport) {
@@ -295,8 +299,8 @@ components.groovyLibrary {
// By declaring a codehaus capability we can tell Gradle that the user has to
// choose between "old" groovy and "new" groovy
List<String> capabilities = [
- "org.codehaus.groovy:${archivesBaseName}:${sharedConfiguration.groovyVersion.get()}",
- "org.apache.groovy:${archivesBaseName}:${sharedConfiguration.groovyVersion.get()}"
+ "org.codehaus.groovy:${base.archivesName.get()}:${sharedConfiguration.groovyVersion.get()}",
+ "org.apache.groovy:${base.archivesName.get()}:${sharedConfiguration.groovyVersion.get()}"
]
int targetJvmVersion = Integer.valueOf(sharedConfiguration.targetJavaVersion.get())
// First we create the "API" and "runtime" variants of Groovy for publication
@@ -326,13 +330,13 @@ afterEvaluate {
@CompileStatic
static Configuration createConsumableConfiguration(ObjectFactory objects,
- TaskContainer tasks,
- ConfigurationContainer container,
- String name,
- String usage,
- String artifactTask,
- List<String> capabilities,
- int targetJvmVersion) {
+ TaskContainer tasks,
+ ConfigurationContainer container,
+ String name,
+ String usage,
+ String artifactTask,
+ List<String> capabilities,
+ int targetJvmVersion) {
container.create(name) { Configuration cnf ->
cnf.canBeConsumed = true
cnf.canBeResolved = false
(groovy) 01/04: minor refactor: use later gradle syntax
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit b3dccbdf0f581810d89dd04615e1fba59bf5beac
Author: Paul King <pa...@asert.com.au>
AuthorDate: Mon Dec 2 17:35:33 2024 +1000
minor refactor: use later gradle syntax
---
build-logic/src/main/groovy/org.apache.groovy-core.gradle | 6 ++++--
build-logic/src/main/groovy/org.apache.groovy-internal.gradle | 3 ++-
subprojects/groovy-binary/build.gradle | 4 ++--
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/build-logic/src/main/groovy/org.apache.groovy-core.gradle b/build-logic/src/main/groovy/org.apache.groovy-core.gradle
index 27121a0c5e..db8416dd6c 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-core.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-core.gradle
@@ -162,7 +162,8 @@ interface CoreServices {
def execOperations = objects.newInstance(CoreServices).execOperations
tasks.named('compileJava') {
- options.fork(memoryMaximumSize: sharedConfiguration.javacMaxMemory.get())
+ options.fork = true
+ options.forkOptions.memoryMaximumSize = sharedConfiguration.javacMaxMemory.get()
inputs.files(configurations.tools)
doLast {
@@ -175,7 +176,8 @@ tasks.named('compileJava') {
}
tasks.named('compileTestGroovy') {
- groovyOptions.fork(memoryMaximumSize: groovycTest_mx)
+ groovyOptions.fork = true
+ groovyOptions.forkOptions.memoryMaximumSize = groovycTest_mx
}
tasks.register('checkCompatibility') {
diff --git a/build-logic/src/main/groovy/org.apache.groovy-internal.gradle b/build-logic/src/main/groovy/org.apache.groovy-internal.gradle
index d7b1997c26..46eba8f742 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-internal.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-internal.gradle
@@ -77,8 +77,9 @@ tasks.withType(AbstractCompile).configureEach {
}
tasks.withType(GroovyCompile).configureEach {
+ groovyOptions.fork = true
groovyOptions.forkOptions.jvmArgs += ["-Dgroovy.antlr4.cache.threshold=100", "-Dgroovy.target.bytecode=${sharedConfiguration.groovyTargetBytecodeVersion.get()}" as String]
- groovyOptions.fork(memoryMaximumSize: sharedConfiguration.groovycMaxMemory.get())
+ groovyOptions.forkOptions.memoryMaximumSize = sharedConfiguration.groovycMaxMemory.get()
groovyClasspath = configurations.groovyCompilerClasspath
// See also https://docs.gradle.org/current/userguide/groovy_plugin.html#sec:incremental_groovy_compilation
diff --git a/subprojects/groovy-binary/build.gradle b/subprojects/groovy-binary/build.gradle
index d0816f9e5a..a58a81deff 100644
--- a/subprojects/groovy-binary/build.gradle
+++ b/subprojects/groovy-binary/build.gradle
@@ -96,10 +96,10 @@ distribution {
into('bin') {
from(rootProject.file('src/bin')) {
filter(ReplaceTokens, tokens: [GROOVYJAR: "groovy-${versions.groovy}.jar".toString()])
- fileMode = 0755
+ filePermissions { unix('rwxr-xr-x') }
exclude 'groovy.icns'
}
- from projects.groovyDocgenerator.dependencyProject.file('src/main/resources/org/apache/groovy/docgenerator/groovy.ico')
+ from project.project(projects.groovyDocgenerator.path).file('src/main/resources/org/apache/groovy/docgenerator/groovy.ico')
}
into('licenses') {
from rootProject.file('licenses')
(groovy) 03/04: minor refactor: later gradle syntax
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit eeab52f19c19c95a11d4268dc352f8d9df1c81c7
Author: Paul King <pa...@asert.com.au>
AuthorDate: Fri Jan 3 03:12:41 2025 +1000
minor refactor: later gradle syntax
---
build-logic/src/main/groovy/org.apache.groovy-base.gradle | 4 ++--
.../src/main/groovy/org.apache.groovy-performance.gradle | 2 +-
.../main/groovy/org.apache.groovy-published-library.gradle | 14 +++++++-------
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/build-logic/src/main/groovy/org.apache.groovy-base.gradle b/build-logic/src/main/groovy/org.apache.groovy-base.gradle
index ffc7d3cb62..94ac9b845a 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-base.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-base.gradle
@@ -215,8 +215,8 @@ tasks.register("jarjar", JarJarTask) {
}
tasks.withType(AbstractCompile).configureEach {
- sourceCompatibility(sharedConfiguration.targetJavaVersion.get())
- targetCompatibility(sharedConfiguration.targetJavaVersion.get())
+ sourceCompatibility = sharedConfiguration.targetJavaVersion.get()
+ targetCompatibility = sharedConfiguration.targetJavaVersion.get()
}
tasks.withType(Javadoc).configureEach {
diff --git a/build-logic/src/main/groovy/org.apache.groovy-performance.gradle b/build-logic/src/main/groovy/org.apache.groovy-performance.gradle
index a8b65e75fb..2e46df2767 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-performance.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-performance.gradle
@@ -37,7 +37,7 @@ configurations {
repositories {
mavenCentral()
maven {
- url 'https://repository.ow2.org/nexus/content/repositories/public/'
+ url = 'https://repository.ow2.org/nexus/content/repositories/public/'
}
}
diff --git a/build-logic/src/main/groovy/org.apache.groovy-published-library.gradle b/build-logic/src/main/groovy/org.apache.groovy-published-library.gradle
index c21e4b3396..7d79e2d84b 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-published-library.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-published-library.gradle
@@ -19,17 +19,17 @@ if (pluginManager.hasPlugin('java-platform')) {
publishing {
repositories {
maven {
- name "LocalFile"
- url rootProject.layout.buildDirectory.dir("repo").get().asFile.absolutePath
+ name = "LocalFile"
+ url = rootProject.layout.buildDirectory.dir("repo").get().asFile.absolutePath
}
maven {
- name "Apache"
- url findProperty('groovyVersion').contains('SNAPSHOT')
+ name = "Apache"
+ url = findProperty('groovyVersion').contains('SNAPSHOT')
? 'https://repository.apache.org/content/repositories/snapshots'
: 'https://repository.apache.org/service/local/staging/deploy/maven2'
credentials {
- username findProperty('groovyVersion').contains('SNAPSHOT') ? findProperty('asfNexusUsername') : findProperty('apacheUser')
- password findProperty('groovyVersion').contains('SNAPSHOT') ? findProperty('asfNexusPassword') : findProperty('apachePassword')
+ username = findProperty('groovyVersion').contains('SNAPSHOT') ? findProperty('asfNexusUsername') : findProperty('apacheUser')
+ password = findProperty('groovyVersion').contains('SNAPSHOT') ? findProperty('asfNexusPassword') : findProperty('apachePassword')
}
}
}
@@ -786,7 +786,7 @@ publishing {
}
signing {
- required {
+ required = {
sharedConfiguration.signing.shouldSign(gradle.taskGraph)
}
sign publishing.publications.maven
(groovy) 02/04: minor refactor: use later gradle syntax
Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit d347bc76ae2a1de832ac76ee211b847e6f20b367
Author: Paul King <pa...@asert.com.au>
AuthorDate: Thu Dec 5 08:30:13 2024 +1000
minor refactor: use later gradle syntax
---
build-logic/src/main/groovy/org.apache.groovy-distribution.gradle | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/build-logic/src/main/groovy/org.apache.groovy-distribution.gradle b/build-logic/src/main/groovy/org.apache.groovy-distribution.gradle
index 655a60ff83..b42fc14930 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-distribution.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-distribution.gradle
@@ -116,8 +116,8 @@ dependencies {
def docGDK = tasks.register('docGDK', DocGDK) {
classpath.from configurations.docgeneratorTool
classes.set(distributionExtension.docgeneratorClasses)
- resources.from projects.groovyDocgenerator.dependencyProject.file('src/main/resources/org/apache/groovy/docgenerator/groovy.ico')
- resources.from projects.groovyDocgenerator.dependencyProject.file('src/main/resources/org/apache/groovy/docgenerator/stylesheet.css')
+ resources.from project.project(projects.groovyDocgenerator.path).file('src/main/resources/org/apache/groovy/docgenerator/groovy.ico')
+ resources.from project.project(projects.groovyDocgenerator.path).file('src/main/resources/org/apache/groovy/docgenerator/stylesheet.css')
}
def distBin = tasks.register('distBin', Zip) {