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 2020/12/06 12:14:48 UTC

[groovy] branch master updated (551204b -> ce36df8)

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 551204b  snapshot publish fix
     new e6f2ce3  lazily evaluate artifactory.properties file (thanks Cédric)
     new ce36df8  cleaner separation of sdk components (thanks Cédric)

The 2 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:
 .../groovy/org.apache.groovy-distribution.gradle   | 16 +++++++++++--
 .../groovy/gradle/SharedConfiguration.groovy       | 26 +++++++++++++---------
 2 files changed, 29 insertions(+), 13 deletions(-)


[groovy] 02/02: cleaner separation of sdk components (thanks Cédric)

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 ce36df8004875e4acc02e1e20926f936f25356a6
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sun Dec 6 22:14:39 2020 +1000

    cleaner separation of sdk components (thanks Cédric)
---
 .../main/groovy/org.apache.groovy-distribution.gradle    | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/buildSrc/src/main/groovy/org.apache.groovy-distribution.gradle b/buildSrc/src/main/groovy/org.apache.groovy-distribution.gradle
index 63eee5e..363edab 100644
--- a/buildSrc/src/main/groovy/org.apache.groovy-distribution.gradle
+++ b/buildSrc/src/main/groovy/org.apache.groovy-distribution.gradle
@@ -228,14 +228,26 @@ def bin = configurations.create("distributionBinary") {
     outgoing {
         artifacts {
             artifact tasks.named('distBin')
+        }
+    }
+}
+component.addVariantsFromConfiguration(bin) {
+    mapToOptional()
+}
+
+def sdkElements = configurations.create("sdkElements") {
+    canBeConsumed = false
+    canBeResolved = false
+    outgoing {
+        artifacts {
             artifact tasks.named('distSrc')
             artifact tasks.named('distDoc')
             artifact tasks.named('distSdk')
         }
     }
 }
-component.addVariantsFromConfiguration(bin) {
-    mapToOptional()
+signing {
+    sign sdkElements
 }
 
 


[groovy] 01/02: lazily evaluate artifactory.properties file (thanks Cédric)

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 e6f2ce3869dd9a6148d5fb4e9d8dccbd380f9ba3
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sun Dec 6 22:14:03 2020 +1000

    lazily evaluate artifactory.properties file (thanks Cédric)
---
 .../groovy/gradle/SharedConfiguration.groovy       | 26 +++++++++++++---------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy b/buildSrc/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy
index 419f68c..87bac51 100644
--- a/buildSrc/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy
+++ b/buildSrc/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy
@@ -18,7 +18,6 @@
  */
 package org.apache.groovy.gradle
 
-
 import groovy.transform.CompileStatic
 import org.gradle.StartParameter
 import org.gradle.api.execution.TaskExecutionGraph
@@ -100,16 +99,7 @@ class SharedConfiguration {
         final Provider<String> repoKey
 
         Artifactory(ProjectLayout layout, ProviderFactory providers, Logger logger) {
-            // try to read artifactory.properties
-            Directory base = layout.projectDirectory
-            RegularFile artifactoryFile = base.file('artifactory.properties')
-            while (!artifactoryFile.asFile.exists()) {
-                base = base.dir('..')
-                if (!base) break
-                artifactoryFile = base.file('artifactory.properties')
-            }
-
-            def artifactoryProperties = providers.fileContents(artifactoryFile).asText.forUseAtConfigurationTime().map {
+            def artifactoryProperties = providers.fileContents(artifactoryFile(providers, layout)).asText.forUseAtConfigurationTime().map {
                 def props = new Properties()
                 props.load(new StringReader(it))
                 props
@@ -121,6 +111,20 @@ class SharedConfiguration {
             logger.lifecycle "ArtifactoryUser user: ${username.getOrElse("not defined")}"
         }
 
+        private Provider<RegularFile> artifactoryFile(ProviderFactory providers, ProjectLayout layout) {
+            providers.provider {
+                // try to read artifactory.properties
+                Directory base = layout.projectDirectory
+                RegularFile artifactoryFile = base.file('artifactory.properties')
+                while (!artifactoryFile.asFile.exists()) {
+                    base = base.dir('..')
+                    if (!base) break
+                    artifactoryFile = base.file('artifactory.properties')
+                }
+                artifactoryFile
+            }
+        }
+
         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())