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 2022/09/21 03:33:12 UTC

[groovy] branch master updated (781e407bf2 -> aae99bac6a)

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

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


    from 781e407bf2 add license header
     new f4a0aada5e Migrate buildSrc to composite build
     new db4cb65491 Cleanup build-logic
     new cbd62855b1 Configure all maven repos in dependencyResolutionManagement
     new 3bcc7506cd Remove redundant repos
     new aae99bac6a Revert "Cleanup build-logic"

The 5 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:
 {buildSrc => build-logic}/build.gradle                            | 0
 {buildSrc => build-logic}/src/main/groovy/Services.groovy         | 0
 .../src/main/groovy/org.apache.groovy-aggregating-project.gradle  | 0
 .../src/main/groovy/org.apache.groovy-all.gradle                  | 0
 .../src/main/groovy/org.apache.groovy-artifactory.gradle          | 0
 .../src/main/groovy/org.apache.groovy-asciidoctor.gradle          | 0
 .../main/groovy/org.apache.groovy-bad-practices-detection.gradle  | 0
 .../src/main/groovy/org.apache.groovy-base.gradle                 | 0
 .../src/main/groovy/org.apache.groovy-common.gradle               | 4 ----
 .../src/main/groovy/org.apache.groovy-core.gradle                 | 0
 .../src/main/groovy/org.apache.groovy-distribution.gradle         | 0
 .../src/main/groovy/org.apache.groovy-doc-aggregator.gradle       | 0
 .../src/main/groovy/org.apache.groovy-documented.gradle           | 0
 .../src/main/groovy/org.apache.groovy-internal.gradle             | 0
 .../src/main/groovy/org.apache.groovy-jacoco-aggregation.gradle   | 0
 .../src/main/groovy/org.apache.groovy-library.gradle              | 0
 .../src/main/groovy/org.apache.groovy-performance.gradle          | 6 ------
 .../src/main/groovy/org.apache.groovy-platform.gradle             | 0
 .../src/main/groovy/org.apache.groovy-publish-validation.gradle   | 0
 .../src/main/groovy/org.apache.groovy-published-library.gradle    | 0
 .../src/main/groovy/org.apache.groovy-stresstest.gradle           | 0
 .../src/main/groovy/org.apache.groovy-tested.gradle               | 0
 .../groovy/org/apache/groovy/gradle/CheckstyleHtmlReport.groovy   | 0
 .../groovy/gradle/ConcurrentExecutionControlBuildService.groovy   | 0
 .../src/main/groovy/org/apache/groovy/gradle/CoreExtension.groovy | 0
 .../src/main/groovy/org/apache/groovy/gradle/DgmConverter.groovy  | 0
 .../groovy/org/apache/groovy/gradle/DistributionExtension.groovy  | 0
 .../org/apache/groovy/gradle/DocAggregationExtension.groovy       | 0
 .../src/main/groovy/org/apache/groovy/gradle/DocGDK.groovy        | 0
 .../groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy | 0
 .../src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy    | 0
 .../groovy/org/apache/groovy/gradle/PerformanceTestSummary.groovy | 0
 .../org/apache/groovy/gradle/PerformanceTestsExtension.groovy     | 0
 .../groovy/org/apache/groovy/gradle/ReleaseInfoGenerator.groovy   | 0
 .../groovy/org/apache/groovy/gradle/SharedConfiguration.groovy    | 0
 .../src/main/groovy/org/apache/groovy/gradle/Versions.groovy      | 0
 .../org/apache/groovy/gradle/WriteExtensionDescriptorTask.groovy  | 0
 build.gradle                                                      | 5 -----
 settings.gradle                                                   | 8 ++++++++
 39 files changed, 8 insertions(+), 15 deletions(-)
 rename {buildSrc => build-logic}/build.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/Services.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-aggregating-project.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-all.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-artifactory.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-asciidoctor.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-base.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-common.gradle (98%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-core.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-distribution.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-doc-aggregator.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-documented.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-internal.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-jacoco-aggregation.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-library.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-performance.gradle (93%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-platform.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-publish-validation.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-published-library.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-stresstest.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-tested.gradle (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/CheckstyleHtmlReport.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/ConcurrentExecutionControlBuildService.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/CoreExtension.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/DgmConverter.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/DistributionExtension.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/DocAggregationExtension.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/DocGDK.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/PerformanceTestSummary.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/PerformanceTestsExtension.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/ReleaseInfoGenerator.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/Versions.groovy (100%)
 rename {buildSrc => build-logic}/src/main/groovy/org/apache/groovy/gradle/WriteExtensionDescriptorTask.groovy (100%)


[groovy] 05/05: Revert "Cleanup build-logic"

Posted by pa...@apache.org.
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

commit aae99bac6a90ab8ef3c3f4a838a6537d8db5fdf9
Author: Goooler <wa...@gmail.com>
AuthorDate: Tue Sep 20 21:28:06 2022 +0800

    Revert "Cleanup build-logic"
    
    This reverts commit 969d8b24ffaa9e1ca2fc226979a7385f1057e70a.
---
 .../org.apache.groovy-bad-practices-detection.gradle   |  4 +---
 .../src/main/groovy/org.apache.groovy-base.gradle      | 18 +++++++++---------
 .../groovy/org.apache.groovy-published-library.gradle  |  6 ++----
 .../apache/groovy/gradle/GroovyLibraryExtension.groovy |  5 +++--
 .../groovy/org/apache/groovy/gradle/JarJarTask.groovy  |  3 ++-
 .../apache/groovy/gradle/SharedConfiguration.groovy    |  4 ++--
 6 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/build-logic/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle b/build-logic/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle
index 6cdb2ef56f..d44211ec26 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle
@@ -1,5 +1,3 @@
-import groovy.transform.CompileStatic
-
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -44,7 +42,7 @@ allprojects { p ->
     p.configurations.metaClass = new ContainerMetaclassClass(p.configurations.metaClass, checkResolution)
 }
 
-@CompileStatic
+@groovy.transform.CompileStatic
 class ContainerMetaclassClass extends DelegatingMetaClass {
     Closure configuration
 
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 8e14e7e042..06b3719779 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-base.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-base.gradle
@@ -322,14 +322,14 @@ afterEvaluate {
 }
 
 @CompileStatic
-static Configuration createConsumableConfiguration(ObjectFactory objects,
-                                                   TaskContainer tasks,
-                                                   ConfigurationContainer container,
-                                                   String name,
-                                                   String usage,
-                                                   String artifactTask,
-                                                   List<String> capabilities,
-                                                   int targetJvmVersion) {
+Configuration createConsumableConfiguration(ObjectFactory objects,
+                                            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
@@ -348,4 +348,4 @@ static Configuration createConsumableConfiguration(ObjectFactory objects,
             }
         }
     }
-}
+}
\ No newline at end of file
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 d993eb950f..3acc6946fb 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
@@ -1,5 +1,3 @@
-import groovy.swing.SwingBuilder
-
 plugins {
     id 'maven-publish'
     id 'signing'
@@ -828,7 +826,7 @@ gradle.taskGraph.whenReady { taskGraph ->
 def promptUser(String prompt) {
     def response = ''
     if (System.console() == null) {
-        new SwingBuilder().edt {
+        new groovy.swing.SwingBuilder().edt {
             dialog(modal: true, // pause build
                     title: 'Response required', // dialog title
                     alwaysOnTop: true,
@@ -855,4 +853,4 @@ def promptUser(String prompt) {
         throw new InvalidUserDataException("Null response detected!")
     }
     response
-}
+}
\ No newline at end of file
diff --git a/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
index cb87c31fe4..74468cf287 100644
--- a/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
+++ b/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
@@ -42,6 +42,7 @@ import org.gradle.api.plugins.JavaPluginExtension
 import org.gradle.api.provider.ListProperty
 import org.gradle.api.provider.Property
 import org.gradle.api.tasks.TaskContainer
+import org.gradle.api.tasks.TaskProvider
 import org.gradle.api.tasks.bundling.Jar
 
 import javax.inject.Inject
@@ -110,7 +111,7 @@ class GroovyLibraryExtension {
     ) {
         grooid.set(true)
         def grooidJar = tasks.register("grooidJar", JarJarTask) {
-            def jarjar = tasks.named("jarjar", JarJarTask)
+            TaskProvider<JarJarTask> jarjar = (TaskProvider<JarJarTask>) tasks.named("jarjar")
             it.dependsOn(jarjar)
             it.from.set(jarjar.flatMap { it.outputFile })
             if (librariesToRepackage) {
@@ -129,7 +130,7 @@ class GroovyLibraryExtension {
             it.createManifest = false
             it.includedResources = resources
             it.outputFile.set(layout.buildDirectory.file(
-                    tasks.named('jar', Jar).map { jar ->
+                    tasks.named('jar').map { Jar jar ->
                         "libs/${jar.archiveBaseName.get()}-${jar.archiveVersion.get()}-grooid.jar"
                     }
             ))
diff --git a/build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy
index d80107cd63..369fdf21a4 100644
--- a/build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy
+++ b/build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy
@@ -191,4 +191,5 @@ class JarJarTask extends DefaultTask {
     private static String baseName(File file) {
         file.name.substring(0, file.name.lastIndexOf('-'))
     }
-}
+
+}
\ No newline at end of file
diff --git a/build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy
index f7acf93ac8..b03304642e 100644
--- a/build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy
+++ b/build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy
@@ -114,7 +114,7 @@ class SharedConfiguration {
             logger.lifecycle "ArtifactoryUser user: ${username.getOrElse("not defined")}"
         }
 
-        private static Provider<RegularFile> artifactoryFile(ProviderFactory providers, ProjectLayout layout) {
+        private Provider<RegularFile> artifactoryFile(ProviderFactory providers, ProjectLayout layout) {
             providers.provider {
                 // try to read artifactory.properties
                 Directory base = layout.projectDirectory
@@ -127,7 +127,7 @@ class SharedConfiguration {
             }
         }
 
-        private static Provider<String> provider(ProviderFactory providers, Provider<Properties> properties, String propertyName, String gradlePropertyName, String envVarName) {
+        private Provider<String> provider(ProviderFactory providers, Provider<Properties> properties, String propertyName, String gradlePropertyName, String envVarName) {
             return providers.gradleProperty(gradlePropertyName).forUseAtConfigurationTime()
                     .orElse(providers.environmentVariable(envVarName).forUseAtConfigurationTime())
                     .orElse(properties.map { it.getProperty(propertyName) })


[groovy] 03/05: Configure all maven repos in dependencyResolutionManagement

Posted by pa...@apache.org.
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

commit cbd62855b14db3cf0fe70413aed43cc0a8babf46
Author: Goooler <wa...@gmail.com>
AuthorDate: Sat Sep 3 13:07:06 2022 +0800

    Configure all maven repos in dependencyResolutionManagement
---
 build-logic/src/main/groovy/org.apache.groovy-common.gradle      | 4 ----
 build-logic/src/main/groovy/org.apache.groovy-performance.gradle | 6 ------
 build.gradle                                                     | 5 -----
 settings.gradle                                                  | 8 ++++++++
 4 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/build-logic/src/main/groovy/org.apache.groovy-common.gradle b/build-logic/src/main/groovy/org.apache.groovy-common.gradle
index 2db32283a2..d518274011 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-common.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-common.gradle
@@ -41,10 +41,6 @@ if (project == rootProject) {
 group = 'org.apache.groovy'
 version = sharedConfiguration.groovyVersion.get()
 
-repositories {
-    mavenCentral()
-}
-
 tasks.named('rat') {
     inputDir = projectDir
     excludes = ['subprojects/**', // covered above
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 f868ff1375..271217b9a4 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-performance.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-performance.gradle
@@ -34,12 +34,6 @@ configurations {
     testImplementation.extendsFrom(stats)
 }
 
-repositories {
-    mavenCentral()
-    maven{ url('https://repository.ow2.org/nexus/content/repositories/public/')}
-    mavenLocal()
-}
-
 dependencies {
     jmh project(":")
     testImplementation project(":")
diff --git a/build.gradle b/build.gradle
index 34657ca847..85643bd41c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -35,11 +35,6 @@ buildScanRecipes {
 
 archivesBaseName = 'groovy'
 
-repositories {
-    // todo Some repos are needed only for some configs. Declare them just for the configuration once Gradle allows this.
-    maven { url 'https://repository.jboss.org/nexus/content/groups/m2-release-proxy' } // tools
-}
-
 groovyLibrary {
     registerOptionalFeature 'gpars'
     registerOptionalFeature 'grapes'
diff --git a/settings.gradle b/settings.gradle
index d28757c6fb..76047b49bc 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -40,6 +40,14 @@ gradleEnterprise {
     }
 }
 
+dependencyResolutionManagement {
+    repositories {
+        mavenCentral()
+        maven{ url('https://repository.ow2.org/nexus/content/repositories/public/')}
+        mavenLocal()
+    }
+}
+
 enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
 
 def subprojects = [


[groovy] 04/05: Remove redundant repos

Posted by pa...@apache.org.
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

commit 3bcc7506cd070ee06ddc754d820f5da16ca4571b
Author: Goooler <wa...@gmail.com>
AuthorDate: Tue Sep 20 20:55:30 2022 +0800

    Remove redundant repos
---
 settings.gradle | 2 --
 1 file changed, 2 deletions(-)

diff --git a/settings.gradle b/settings.gradle
index 76047b49bc..98cf1efc4e 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -43,8 +43,6 @@ gradleEnterprise {
 dependencyResolutionManagement {
     repositories {
         mavenCentral()
-        maven{ url('https://repository.ow2.org/nexus/content/repositories/public/')}
-        mavenLocal()
     }
 }
 


[groovy] 01/05: Migrate buildSrc to composite build

Posted by pa...@apache.org.
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

commit f4a0aada5e12514f6d82ba6096980f578143017e
Author: Goooler <wa...@gmail.com>
AuthorDate: Sat Sep 3 11:27:23 2022 +0800

    Migrate buildSrc to composite build
---
 {buildSrc => build-logic}/build.gradle                                  | 0
 {buildSrc => build-logic}/src/main/groovy/Services.groovy               | 0
 .../src/main/groovy/org.apache.groovy-aggregating-project.gradle        | 0
 {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-all.gradle  | 0
 .../src/main/groovy/org.apache.groovy-artifactory.gradle                | 0
 .../src/main/groovy/org.apache.groovy-asciidoctor.gradle                | 0
 .../src/main/groovy/org.apache.groovy-bad-practices-detection.gradle    | 0
 {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-base.gradle | 0
 .../src/main/groovy/org.apache.groovy-common.gradle                     | 0
 {buildSrc => build-logic}/src/main/groovy/org.apache.groovy-core.gradle | 0
 .../src/main/groovy/org.apache.groovy-distribution.gradle               | 0
 .../src/main/groovy/org.apache.groovy-doc-aggregator.gradle             | 0
 .../src/main/groovy/org.apache.groovy-documented.gradle                 | 0
 .../src/main/groovy/org.apache.groovy-internal.gradle                   | 0
 .../src/main/groovy/org.apache.groovy-jacoco-aggregation.gradle         | 0
 .../src/main/groovy/org.apache.groovy-library.gradle                    | 0
 .../src/main/groovy/org.apache.groovy-performance.gradle                | 0
 .../src/main/groovy/org.apache.groovy-platform.gradle                   | 0
 .../src/main/groovy/org.apache.groovy-publish-validation.gradle         | 0
 .../src/main/groovy/org.apache.groovy-published-library.gradle          | 0
 .../src/main/groovy/org.apache.groovy-stresstest.gradle                 | 0
 .../src/main/groovy/org.apache.groovy-tested.gradle                     | 0
 .../main/groovy/org/apache/groovy/gradle/CheckstyleHtmlReport.groovy    | 0
 .../apache/groovy/gradle/ConcurrentExecutionControlBuildService.groovy  | 0
 .../src/main/groovy/org/apache/groovy/gradle/CoreExtension.groovy       | 0
 .../src/main/groovy/org/apache/groovy/gradle/DgmConverter.groovy        | 0
 .../main/groovy/org/apache/groovy/gradle/DistributionExtension.groovy   | 0
 .../main/groovy/org/apache/groovy/gradle/DocAggregationExtension.groovy | 0
 .../src/main/groovy/org/apache/groovy/gradle/DocGDK.groovy              | 0
 .../main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy  | 0
 .../src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy          | 0
 .../main/groovy/org/apache/groovy/gradle/PerformanceTestSummary.groovy  | 0
 .../groovy/org/apache/groovy/gradle/PerformanceTestsExtension.groovy    | 0
 .../main/groovy/org/apache/groovy/gradle/ReleaseInfoGenerator.groovy    | 0
 .../src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy | 0
 .../src/main/groovy/org/apache/groovy/gradle/Versions.groovy            | 0
 .../groovy/org/apache/groovy/gradle/WriteExtensionDescriptorTask.groovy | 0
 settings.gradle                                                         | 2 ++
 38 files changed, 2 insertions(+)

diff --git a/buildSrc/build.gradle b/build-logic/build.gradle
similarity index 100%
rename from buildSrc/build.gradle
rename to build-logic/build.gradle
diff --git a/buildSrc/src/main/groovy/Services.groovy b/build-logic/src/main/groovy/Services.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/Services.groovy
rename to build-logic/src/main/groovy/Services.groovy
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-aggregating-project.gradle b/build-logic/src/main/groovy/org.apache.groovy-aggregating-project.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-aggregating-project.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-aggregating-project.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-all.gradle b/build-logic/src/main/groovy/org.apache.groovy-all.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-all.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-all.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-artifactory.gradle b/build-logic/src/main/groovy/org.apache.groovy-artifactory.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-artifactory.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-artifactory.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-asciidoctor.gradle b/build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-asciidoctor.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle b/build-logic/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-base.gradle b/build-logic/src/main/groovy/org.apache.groovy-base.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-base.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-base.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-common.gradle b/build-logic/src/main/groovy/org.apache.groovy-common.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-common.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-common.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-core.gradle b/build-logic/src/main/groovy/org.apache.groovy-core.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-core.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-core.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-distribution.gradle b/build-logic/src/main/groovy/org.apache.groovy-distribution.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-distribution.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-distribution.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-doc-aggregator.gradle b/build-logic/src/main/groovy/org.apache.groovy-doc-aggregator.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-doc-aggregator.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-doc-aggregator.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-documented.gradle b/build-logic/src/main/groovy/org.apache.groovy-documented.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-documented.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-documented.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-internal.gradle b/build-logic/src/main/groovy/org.apache.groovy-internal.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-internal.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-internal.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-jacoco-aggregation.gradle b/build-logic/src/main/groovy/org.apache.groovy-jacoco-aggregation.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-jacoco-aggregation.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-jacoco-aggregation.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-library.gradle b/build-logic/src/main/groovy/org.apache.groovy-library.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-library.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-library.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-performance.gradle b/build-logic/src/main/groovy/org.apache.groovy-performance.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-performance.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-performance.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-platform.gradle b/build-logic/src/main/groovy/org.apache.groovy-platform.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-platform.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-platform.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-publish-validation.gradle b/build-logic/src/main/groovy/org.apache.groovy-publish-validation.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-publish-validation.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-publish-validation.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-published-library.gradle b/build-logic/src/main/groovy/org.apache.groovy-published-library.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-published-library.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-published-library.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-stresstest.gradle b/build-logic/src/main/groovy/org.apache.groovy-stresstest.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-stresstest.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-stresstest.gradle
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-tested.gradle b/build-logic/src/main/groovy/org.apache.groovy-tested.gradle
similarity index 100%
rename from buildSrc/src/main/groovy/org.apache.groovy-tested.gradle
rename to build-logic/src/main/groovy/org.apache.groovy-tested.gradle
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/CheckstyleHtmlReport.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/CheckstyleHtmlReport.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/CheckstyleHtmlReport.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/CheckstyleHtmlReport.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/ConcurrentExecutionControlBuildService.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/ConcurrentExecutionControlBuildService.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/ConcurrentExecutionControlBuildService.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/ConcurrentExecutionControlBuildService.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/CoreExtension.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/CoreExtension.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/CoreExtension.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/CoreExtension.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/DgmConverter.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/DgmConverter.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/DgmConverter.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/DgmConverter.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/DistributionExtension.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/DistributionExtension.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/DistributionExtension.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/DistributionExtension.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/DocAggregationExtension.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/DocAggregationExtension.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/DocAggregationExtension.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/DocAggregationExtension.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/DocGDK.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/DocGDK.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/DocGDK.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/DocGDK.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/PerformanceTestSummary.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/PerformanceTestSummary.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/PerformanceTestSummary.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/PerformanceTestSummary.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/PerformanceTestsExtension.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/PerformanceTestsExtension.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/PerformanceTestsExtension.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/PerformanceTestsExtension.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/ReleaseInfoGenerator.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/ReleaseInfoGenerator.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/ReleaseInfoGenerator.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/ReleaseInfoGenerator.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/Versions.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/Versions.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/Versions.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/Versions.groovy
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/WriteExtensionDescriptorTask.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/WriteExtensionDescriptorTask.groovy
similarity index 100%
rename from buildSrc/src/main/groovy/org/apache/groovy/gradle/WriteExtensionDescriptorTask.groovy
rename to build-logic/src/main/groovy/org/apache/groovy/gradle/WriteExtensionDescriptorTask.groovy
diff --git a/settings.gradle b/settings.gradle
index ee3138ec15..d28757c6fb 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -24,6 +24,8 @@ pluginManagement {
         mavenCentral()
 //        maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
     }
+
+    includeBuild("build-logic")
 }
 
 // check https://gradle.com/enterprise/releases with new versions. GE plugin version should not lag behind Gradle version


[groovy] 02/05: Cleanup build-logic

Posted by pa...@apache.org.
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

commit db4cb65491b5b2f3a7fc5f1fd96b6176ecd46844
Author: Goooler <wa...@gmail.com>
AuthorDate: Sat Sep 3 11:48:27 2022 +0800

    Cleanup build-logic
---
 .../org.apache.groovy-bad-practices-detection.gradle   |  4 +++-
 .../src/main/groovy/org.apache.groovy-base.gradle      | 18 +++++++++---------
 .../groovy/org.apache.groovy-published-library.gradle  |  6 ++++--
 .../apache/groovy/gradle/GroovyLibraryExtension.groovy |  5 ++---
 .../groovy/org/apache/groovy/gradle/JarJarTask.groovy  |  3 +--
 .../apache/groovy/gradle/SharedConfiguration.groovy    |  4 ++--
 6 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/build-logic/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle b/build-logic/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle
index d44211ec26..6cdb2ef56f 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-bad-practices-detection.gradle
@@ -1,3 +1,5 @@
+import groovy.transform.CompileStatic
+
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -42,7 +44,7 @@ allprojects { p ->
     p.configurations.metaClass = new ContainerMetaclassClass(p.configurations.metaClass, checkResolution)
 }
 
-@groovy.transform.CompileStatic
+@CompileStatic
 class ContainerMetaclassClass extends DelegatingMetaClass {
     Closure configuration
 
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 06b3719779..8e14e7e042 100644
--- a/build-logic/src/main/groovy/org.apache.groovy-base.gradle
+++ b/build-logic/src/main/groovy/org.apache.groovy-base.gradle
@@ -322,14 +322,14 @@ afterEvaluate {
 }
 
 @CompileStatic
-Configuration createConsumableConfiguration(ObjectFactory objects,
-                                            TaskContainer tasks,
-                                            ConfigurationContainer container,
-                                            String name,
-                                            String usage,
-                                            String artifactTask,
-                                            List<String> capabilities,
-                                            int targetJvmVersion) {
+static Configuration createConsumableConfiguration(ObjectFactory objects,
+                                                   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
@@ -348,4 +348,4 @@ Configuration createConsumableConfiguration(ObjectFactory objects,
             }
         }
     }
-}
\ No newline at end of file
+}
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 3acc6946fb..d993eb950f 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
@@ -1,3 +1,5 @@
+import groovy.swing.SwingBuilder
+
 plugins {
     id 'maven-publish'
     id 'signing'
@@ -826,7 +828,7 @@ gradle.taskGraph.whenReady { taskGraph ->
 def promptUser(String prompt) {
     def response = ''
     if (System.console() == null) {
-        new groovy.swing.SwingBuilder().edt {
+        new SwingBuilder().edt {
             dialog(modal: true, // pause build
                     title: 'Response required', // dialog title
                     alwaysOnTop: true,
@@ -853,4 +855,4 @@ def promptUser(String prompt) {
         throw new InvalidUserDataException("Null response detected!")
     }
     response
-}
\ No newline at end of file
+}
diff --git a/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
index 74468cf287..cb87c31fe4 100644
--- a/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
+++ b/build-logic/src/main/groovy/org/apache/groovy/gradle/GroovyLibraryExtension.groovy
@@ -42,7 +42,6 @@ import org.gradle.api.plugins.JavaPluginExtension
 import org.gradle.api.provider.ListProperty
 import org.gradle.api.provider.Property
 import org.gradle.api.tasks.TaskContainer
-import org.gradle.api.tasks.TaskProvider
 import org.gradle.api.tasks.bundling.Jar
 
 import javax.inject.Inject
@@ -111,7 +110,7 @@ class GroovyLibraryExtension {
     ) {
         grooid.set(true)
         def grooidJar = tasks.register("grooidJar", JarJarTask) {
-            TaskProvider<JarJarTask> jarjar = (TaskProvider<JarJarTask>) tasks.named("jarjar")
+            def jarjar = tasks.named("jarjar", JarJarTask)
             it.dependsOn(jarjar)
             it.from.set(jarjar.flatMap { it.outputFile })
             if (librariesToRepackage) {
@@ -130,7 +129,7 @@ class GroovyLibraryExtension {
             it.createManifest = false
             it.includedResources = resources
             it.outputFile.set(layout.buildDirectory.file(
-                    tasks.named('jar').map { Jar jar ->
+                    tasks.named('jar', Jar).map { jar ->
                         "libs/${jar.archiveBaseName.get()}-${jar.archiveVersion.get()}-grooid.jar"
                     }
             ))
diff --git a/build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy
index 369fdf21a4..d80107cd63 100644
--- a/build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy
+++ b/build-logic/src/main/groovy/org/apache/groovy/gradle/JarJarTask.groovy
@@ -191,5 +191,4 @@ class JarJarTask extends DefaultTask {
     private static String baseName(File file) {
         file.name.substring(0, file.name.lastIndexOf('-'))
     }
-
-}
\ No newline at end of file
+}
diff --git a/build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy b/build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy
index b03304642e..f7acf93ac8 100644
--- a/build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy
+++ b/build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy
@@ -114,7 +114,7 @@ class SharedConfiguration {
             logger.lifecycle "ArtifactoryUser user: ${username.getOrElse("not defined")}"
         }
 
-        private Provider<RegularFile> artifactoryFile(ProviderFactory providers, ProjectLayout layout) {
+        private static Provider<RegularFile> artifactoryFile(ProviderFactory providers, ProjectLayout layout) {
             providers.provider {
                 // try to read artifactory.properties
                 Directory base = layout.projectDirectory
@@ -127,7 +127,7 @@ class SharedConfiguration {
             }
         }
 
-        private Provider<String> provider(ProviderFactory providers, Provider<Properties> properties, String propertyName, String gradlePropertyName, String envVarName) {
+        private static Provider<String> provider(ProviderFactory providers, Provider<Properties> properties, String propertyName, String gradlePropertyName, String envVarName) {
             return providers.gradleProperty(gradlePropertyName).forUseAtConfigurationTime()
                     .orElse(providers.environmentVariable(envVarName).forUseAtConfigurationTime())
                     .orElse(properties.map { it.getProperty(propertyName) })