This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 3c6596cdfe minor refactor: use later gradle syntax
3c6596cdfe is described below

commit 3c6596cdfea87709bdab913732f57e9710e2c9e8
Author: Paul King <[email protected]>
AuthorDate: Mon Jan 6 20:36:46 2025 +1000

    minor refactor: use later gradle syntax
---
 .../main/groovy/org/apache/groovy/gradle/DgmConverter.groovy   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/build-logic/src/main/groovy/org/apache/groovy/gradle/DgmConverter.groovy 
b/build-logic/src/main/groovy/org/apache/groovy/gradle/DgmConverter.groovy
index e639c41883..38703ff41f 100644
--- a/build-logic/src/main/groovy/org/apache/groovy/gradle/DgmConverter.groovy
+++ b/build-logic/src/main/groovy/org/apache/groovy/gradle/DgmConverter.groovy
@@ -24,6 +24,7 @@ import org.gradle.api.DefaultTask
 import org.gradle.api.file.ConfigurableFileCollection
 import org.gradle.api.file.ConfigurableFileTree
 import org.gradle.api.file.DirectoryProperty
+import org.gradle.api.model.ObjectFactory
 import org.gradle.api.tasks.CacheableTask
 import org.gradle.api.tasks.Classpath
 import org.gradle.api.tasks.InputFiles
@@ -41,7 +42,6 @@ class DgmConverter extends DefaultTask {
 
     private final ExecOperations execOperations
 
-
     @OutputDirectory
     final DirectoryProperty outputDirectory
 
@@ -54,12 +54,12 @@ class DgmConverter extends DefaultTask {
     final ConfigurableFileCollection classpath
 
     @Inject
-    DgmConverter(ExecOperations execOperations) {
+    DgmConverter(ExecOperations execOperations, ObjectFactory objects) {
         description = 'Generates DGM info file required for faster startup.'
         this.execOperations = execOperations
-        classpath = project.objects.fileCollection()
-        sources = project.objects.fileTree()
-        outputDirectory = project.objects.directoryProperty().convention(
+        classpath = objects.fileCollection()
+        sources = objects.fileTree()
+        outputDirectory = objects.directoryProperty().convention(
                 project.layout.buildDirectory.dir("dgm")
         )
     }

Reply via email to