Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 10286200BF6 for ; Tue, 10 Jan 2017 23:34:31 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0EB08160B3D; Tue, 10 Jan 2017 22:34:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0D8CB160B2C for ; Tue, 10 Jan 2017 23:34:29 +0100 (CET) Received: (qmail 34668 invoked by uid 500); 10 Jan 2017 22:34:29 -0000 Mailing-List: contact commits-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list commits@groovy.apache.org Received: (qmail 34659 invoked by uid 99); 10 Jan 2017 22:34:29 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2017 22:34:29 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 14E33DF9E6; Tue, 10 Jan 2017 22:34:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: paulk@apache.org To: commits@groovy.apache.org Date: Tue, 10 Jan 2017 22:34:29 -0000 Message-Id: In-Reply-To: <9ae8d03890d14dcc93b5fbb494930bdf@git.apache.org> References: <9ae8d03890d14dcc93b5fbb494930bdf@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/2] groovy git commit: rename a property to better reflect reality archived-at: Tue, 10 Jan 2017 22:34:31 -0000 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/86065a72 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/86065a72 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/86065a72 Branch: refs/heads/master Commit: 86065a72b343b0eb965a884edfdd8242acb86880 Parents: f9a3c0e Author: paulk Authored: Tue Jan 10 18:41:40 2017 +1000 Committer: paulk Committed: Wed Jan 11 08:34:06 2017 +1000 ---------------------------------------------------------------------- build.gradle | 2 +- gradle/assemble.gradle | 2 +- gradle/bintray.gradle | 97 --------------------------------------------- gradle/publish.gradle | 97 +++++++++++++++++++++++++++++++++++++++++++++ gradle/upload.gradle | 8 ++-- 5 files changed, 103 insertions(+), 103 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/86065a72/build.gradle ---------------------------------------------------------------------- diff --git a/build.gradle b/build.gradle index 70f8732..9343891 100644 --- a/build.gradle +++ b/build.gradle @@ -61,7 +61,7 @@ buildScan { apply from: 'gradle/filter.gradle' apply from: 'gradle/indy.gradle' -apply from: 'gradle/bintray.gradle' +apply from: 'gradle/publish.gradle' apply plugin: 'javadocHotfix' apply plugin: "com.github.jk1.dependency-license-report" http://git-wip-us.apache.org/repos/asf/groovy/blob/86065a72/gradle/assemble.gradle ---------------------------------------------------------------------- diff --git a/gradle/assemble.gradle b/gradle/assemble.gradle index 12f2917..050a9ec 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/86065a72/gradle/bintray.gradle ---------------------------------------------------------------------- diff --git a/gradle/bintray.gradle b/gradle/bintray.gradle deleted file mode 100644 index d52f89c..0000000 --- a/gradle/bintray.gradle +++ /dev/null @@ -1,97 +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','') - } -} - -logger.lifecycle "Bintray user: $bintrayUser" - -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/86065a72/gradle/publish.gradle ---------------------------------------------------------------------- diff --git a/gradle/publish.gradle b/gradle/publish.gradle new file mode 100644 index 0000000..b7f07de --- /dev/null +++ b/gradle/publish.gradle @@ -0,0 +1,97 @@ +/* + * 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','') + } +} + +logger.lifecycle "Bintray user: $bintrayUser" + +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/86065a72/gradle/upload.gradle ---------------------------------------------------------------------- diff --git a/gradle/upload.gradle b/gradle/upload.gradle index 85ca9db..c6c1c01 100644 --- a/gradle/upload.gradle +++ b/gradle/upload.gradle @@ -17,11 +17,11 @@ * 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']