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 2017/01/10 08:41:49 UTC

groovy git commit: rename a property to better reflect reality

Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X 08b79316a -> 1c32d6553


rename a property to better reflect reality


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/1c32d655
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/1c32d655
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/1c32d655

Branch: refs/heads/GROOVY_2_4_X
Commit: 1c32d65535f8f88814bc6972ba6965fb81febd2d
Parents: 08b7931
Author: paulk <pa...@asert.com.au>
Authored: Tue Jan 10 18:41:40 2017 +1000
Committer: paulk <pa...@asert.com.au>
Committed: Tue Jan 10 18:41:40 2017 +1000

----------------------------------------------------------------------
 build.gradle           |  2 +-
 gradle/assemble.gradle |  2 +-
 gradle/bintray.gradle  | 95 ---------------------------------------------
 gradle/publish.gradle  | 95 +++++++++++++++++++++++++++++++++++++++++++++
 gradle/upload.gradle   |  8 ++--
 5 files changed, 101 insertions(+), 101 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/1c32d655/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 20f6dee..c2e095a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -44,7 +44,7 @@ buildscript {
 
 apply from: 'gradle/filter.gradle'
 apply from: 'gradle/indy.gradle'
-apply from: 'gradle/bintray.gradle'
+apply from: 'gradle/publish.gradle'
 apply plugin: 'javadocHotfix'
 
 File javaHome = new File(System.getProperty('java.home'))

http://git-wip-us.apache.org/repos/asf/groovy/blob/1c32d655/gradle/assemble.gradle
----------------------------------------------------------------------
diff --git a/gradle/assemble.gradle b/gradle/assemble.gradle
index 38c7252..20d74d6 100644
--- a/gradle/assemble.gradle
+++ b/gradle/assemble.gradle
@@ -41,7 +41,7 @@ ext.srcSpec = copySpec {
                 'cobertura.ser',
                 'junitvmwatcher*.properties',
                 'out',
-                'bintray.properties', // generated by the CI server
+                'artifactory.properties', // generated by the CI server
                 'gradle.properties.gz', // generated by the CI server
                 '**/*.iml',         // used by Intellij IDEA
                 '**/*.ipr',         // used by Intellij IDEA

http://git-wip-us.apache.org/repos/asf/groovy/blob/1c32d655/gradle/bintray.gradle
----------------------------------------------------------------------
diff --git a/gradle/bintray.gradle b/gradle/bintray.gradle
deleted file mode 100644
index 8c98f40..0000000
--- a/gradle/bintray.gradle
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-import org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact
-
-ext.bintrayUser = project.hasProperty('bintrayUser') ? project.bintrayUser : System.getenv('BINTRAY_USER')
-ext.bintrayPassword = project.hasProperty('bintrayPassword') ? project.bintrayPassword : System.getenv('BINTRAY_PASSWORD')
-
-if (!bintrayUser) {
-    // try to read from properties
-    def bintrayFile = file('bintray.properties')
-    if (bintrayFile.exists()) {
-        def props = new Properties()
-        props.load(bintrayFile.newReader())
-        ext.bintrayUser = props.getProperty('bintrayUser','')
-        ext.bintrayPassword = props.getProperty('bintrayPassword','')
-    }
-}
-
-allprojects {
-    apply plugin: 'com.jfrog.artifactory-upload'
-
-    artifactory {
-        contextUrl = project.hasProperty('bintrayContext') ? project.bintrayContext : 'https://oss.jfrog.org'
-        resolve {
-            repository {
-                repoKey = 'libs-release'
-            }
-        }
-        publish {
-            excludePatterns = 'org/codehaus/groovy/groovy/*/groovy-all-*,org/codehaus/groovy/groovy/*/groovy-backports-*,org/codehaus/groovy/groovy/*/groovy-binary-*'
-            repository {
-                repoKey = project.hasProperty('bintrayRepoKey') ? project.bintrayRepoKey : 'oss-snapshot-local' //The Artifactory repository key to publish to
-                //when using oss.jfrog.org the credentials are from Bintray. For local build we expect them to be found in
-                //~/.gradle/gradle.properties, otherwise to be set in the build server
-                username = rootProject.bintrayUser
-                password = rootProject.bintrayPassword
-            }
-        }
-    }
-}
-
-artifactoryPublish {
-    def curDate = new Date()
-    def pomSource = { a -> "$projectDir/target/poms/pom-${a.name - 'groovy-'}.xml" }
-    def destBase = { a -> "org/codehaus/groovy/${a.name}/${version}/${a.name}-${version}${a.classifier ? '-' + a.classifier : ''}" }
-    def newDetails = { orig, newFile, newExt, newType -> gradleDeployDetails(new DefaultPublishArtifact(
-            orig.name, newExt, newType, orig.classifier, curDate, newFile), 'artifacts', destBase(orig) + '.' + newExt) }
-    def makeTransformedDetails = { orig -> newDetails(orig, orig.file, orig.extension, orig.extension) }
-    def makeTransformedPomDetails = { orig -> newDetails(orig, file(pomSource(orig)), 'pom', 'pom') }
-    def makeTransformedPomSigDetails = { orig -> newDetails(orig, file(pomSource(orig) + '.asc'), 'pom.asc', 'asc') }
-    mavenDescriptor = new File("$projectDir/target/poms/pom-groovy.xml")
-    doFirst{
-        configurations.archives.artifacts.findAll{ it.name != project.name }.each {
-            // the plugin we are using uses the project name rather than the artifact name
-            // as the artifactId, so we add the transformed one ourselves
-            // this also covers signatures which we already added during install
-            deployDetails.add(makeTransformedDetails(it))
-            if (!it.classifier && (it.type == 'jar' || it.type == 'zip')) {
-                // add the pom and its signature
-                deployDetails.add(makeTransformedPomDetails(it))
-                if (isReleaseVersion) {
-                    deployDetails.add(makeTransformedPomSigDetails(it))
-                }
-            }
-        }
-
-        if (isReleaseVersion) {
-            allprojects {
-                configurations.archives.artifacts.findAll{ it.name == project.name && it.type == 'jar' && it.extension == 'jar' && !it.classifier }.each {
-                    // add pom signatures
-                    def pomSigLocation = "$project.projectDir/target/poms/pom-${project == rootProject ? 'groovy' : 'default'}.xml.asc"
-                    deployDetails.add(newDetails(it, file(pomSigLocation), 'pom.asc', 'pom'))
-                }
-            }
-        }
-    }
-}
-
-artifactoryPublish.dependsOn('backportJars')
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/1c32d655/gradle/publish.gradle
----------------------------------------------------------------------
diff --git a/gradle/publish.gradle b/gradle/publish.gradle
new file mode 100644
index 0000000..260e09d
--- /dev/null
+++ b/gradle/publish.gradle
@@ -0,0 +1,95 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+import org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact
+
+ext.artifactoryUser = project.hasProperty('artifactoryUser') ? project.artifactoryUser : System.getenv('ARTIFACTORY_USER')
+ext.artifactoryPassword = project.hasProperty('artifactoryPassword') ? project.artifactoryPassword : System.getenv('ARTIFACTORY_PASSWORD')
+
+if (!artifactoryUser) {
+    // try to read from properties
+    def artifactoryFile = file('artifactory.properties')
+    if (artifactoryFile.exists()) {
+        def props = new Properties()
+        props.load(artifactoryFile.newReader())
+        ext.artifactoryUser = props.getProperty('artifactoryUser','')
+        ext.artifactoryPassword = props.getProperty('artifactoryPassword','')
+    }
+}
+
+allprojects {
+    apply plugin: 'com.jfrog.artifactory-upload'
+
+    artifactory {
+        contextUrl = project.hasProperty('artifactoryContext') ? project.artifactoryContext : 'https://oss.jfrog.org'
+        resolve {
+            repository {
+                repoKey = 'libs-release'
+            }
+        }
+        publish {
+            excludePatterns = 'org/codehaus/groovy/groovy/*/groovy-all-*,org/codehaus/groovy/groovy/*/groovy-backports-*,org/codehaus/groovy/groovy/*/groovy-binary-*'
+            repository {
+                repoKey = project.hasProperty('artifactoryRepoKey') ? project.artifactoryRepoKey : 'oss-snapshot-local' //The Artifactory repository key to publish to
+                //when using oss.jfrog.org the credentials are from Bintray. For local build we expect them to be found in
+                //~/.gradle/gradle.properties, otherwise to be set in the build server
+                username = rootProject.artifactoryUser
+                password = rootProject.artifactoryPassword
+            }
+        }
+    }
+}
+
+artifactoryPublish {
+    def curDate = new Date()
+    def pomSource = { a -> "$projectDir/target/poms/pom-${a.name - 'groovy-'}.xml" }
+    def destBase = { a -> "org/codehaus/groovy/${a.name}/${version}/${a.name}-${version}${a.classifier ? '-' + a.classifier : ''}" }
+    def newDetails = { orig, newFile, newExt, newType -> gradleDeployDetails(new DefaultPublishArtifact(
+            orig.name, newExt, newType, orig.classifier, curDate, newFile), 'artifacts', destBase(orig) + '.' + newExt) }
+    def makeTransformedDetails = { orig -> newDetails(orig, orig.file, orig.extension, orig.extension) }
+    def makeTransformedPomDetails = { orig -> newDetails(orig, file(pomSource(orig)), 'pom', 'pom') }
+    def makeTransformedPomSigDetails = { orig -> newDetails(orig, file(pomSource(orig) + '.asc'), 'pom.asc', 'asc') }
+    mavenDescriptor = new File("$projectDir/target/poms/pom-groovy.xml")
+    doFirst{
+        configurations.archives.artifacts.findAll{ it.name != project.name }.each {
+            // the plugin we are using uses the project name rather than the artifact name
+            // as the artifactId, so we add the transformed one ourselves
+            // this also covers signatures which we already added during install
+            deployDetails.add(makeTransformedDetails(it))
+            if (!it.classifier && (it.type == 'jar' || it.type == 'zip')) {
+                // add the pom and its signature
+                deployDetails.add(makeTransformedPomDetails(it))
+                if (isReleaseVersion) {
+                    deployDetails.add(makeTransformedPomSigDetails(it))
+                }
+            }
+        }
+
+        if (isReleaseVersion) {
+            allprojects {
+                configurations.archives.artifacts.findAll{ it.name == project.name && it.type == 'jar' && it.extension == 'jar' && !it.classifier }.each {
+                    // add pom signatures
+                    def pomSigLocation = "$project.projectDir/target/poms/pom-${project == rootProject ? 'groovy' : 'default'}.xml.asc"
+                    deployDetails.add(newDetails(it, file(pomSigLocation), 'pom.asc', 'pom'))
+                }
+            }
+        }
+    }
+}
+
+artifactoryPublish.dependsOn('backportJars')
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/1c32d655/gradle/upload.gradle
----------------------------------------------------------------------
diff --git a/gradle/upload.gradle b/gradle/upload.gradle
index a50cd50..50926ec 100644
--- a/gradle/upload.gradle
+++ b/gradle/upload.gradle
@@ -16,11 +16,11 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-boolean isUsingBintray = rootProject.hasProperty('bintrayUser') && rootProject.bintrayUser &&
-        rootProject.hasProperty('bintrayPassword') && rootProject.bintrayPassword
+boolean isUsingArtifactory = rootProject.hasProperty('artifactoryUser') && rootProject.artifactoryUser &&
+        rootProject.hasProperty('artifactoryPassword') && rootProject.artifactoryPassword
 
-if (isUsingBintray) {
-    logger.lifecycle 'Deployment environment set to Bintray'
+if (isUsingArtifactory) {
+    logger.lifecycle 'Deployment environment set to Artifactory'
 }
 
 def embedded = ['asm', 'asm-util', 'asm-analysis', 'asm-tree', 'asm-commons', 'antlr', 'commons-cli', 'openbeans']