groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [38/50] groovy git commit: push signing of artifacts into the main build instead of the groovy-release repo (still more tweaks)
Date Thu, 26 Jan 2017 05:31:12 GMT
push signing of artifacts into the main build instead of the groovy-release repo (still more
tweaks)


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

Branch: refs/heads/GROOVY_2_4_X
Commit: d5f321efc3a207fb040d642a719c2d2245623b40
Parents: ef6a187
Author: paulk <paulk@asert.com.au>
Authored: Sat Jan 7 01:14:05 2017 +1000
Committer: paulk <paulk@asert.com.au>
Committed: Sat Jan 7 01:14:05 2017 +1000

----------------------------------------------------------------------
 build.gradle          |  2 +-
 gradle/bintray.gradle | 59 +++++++++++++++++++++++++++++++++++++---------
 gradle/upload.gradle  | 42 ++++++++++++---------------------
 3 files changed, 64 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/d5f321ef/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 0ff13a7..ba2a9d1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -34,7 +34,7 @@ buildscript {
 
     dependencies {
         classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
-        classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:2.2.3'
+        classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:2.2.5'
         classpath 'me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1'
         //classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.1.1'
         //classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5f321ef/gradle/bintray.gradle
----------------------------------------------------------------------
diff --git a/gradle/bintray.gradle b/gradle/bintray.gradle
index 2543a59..829bbd0 100644
--- a/gradle/bintray.gradle
+++ b/gradle/bintray.gradle
@@ -60,33 +60,70 @@ artifactoryPublish {
         def curDate = new Date()
         def additionalFiles = [
                 gradleDeployDetails(new DefaultPublishArtifact("groovy-all", "jar", "jar",
null,
-                        curDate, file("$projectDir/target/libs/groovy-all-${version}.jar")),
'artifacts', "org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}.jar"),
+                        curDate, file("$projectDir/target/libs/groovy-all-${version}.jar")),
'artifacts',
+                        "org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}.jar"),
                 gradleDeployDetails(new DefaultPublishArtifact("groovy-all", "jar", "jar",
'sources',
-                        curDate, file("$projectDir/target/libs/groovy-all-${version}-sources.jar")),
'artifacts', "org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}-sources.jar"),
+                        curDate, file("$projectDir/target/libs/groovy-all-${version}-sources.jar")),
'artifacts',
+                        "org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}-sources.jar"),
                 gradleDeployDetails(new DefaultPublishArtifact("groovy-all", "jar", "jar",
'javadoc',
-                        curDate, file("$projectDir/target/libs/groovy-all-${version}-javadoc.jar")),
'artifacts', "org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}-javadoc.jar"),
+                        curDate, file("$projectDir/target/libs/groovy-all-${version}-javadoc.jar")),
'artifacts',
+                        "org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}-javadoc.jar"),
                 gradleDeployDetails(new DefaultPublishArtifact("groovy-all", "jar", "jar",
'groovydoc',
-                        curDate, file("$projectDir/target/libs/groovy-all-${version}-groovydoc.jar")),
'artifacts', "org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}-groovydoc.jar"),
+                        curDate, file("$projectDir/target/libs/groovy-all-${version}-groovydoc.jar")),
'artifacts',
+                        "org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}-groovydoc.jar"),
                 gradleDeployDetails(new DefaultPublishArtifact("groovy-all", "jar", "jar",
'indy',
-                        curDate, file("$projectDir/target/libs/groovy-all-${version}-indy.jar")),
'artifacts', "org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}-indy.jar"),
+                        curDate, file("$projectDir/target/libs/groovy-all-${version}-indy.jar")),
'artifacts',
+                        "org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}-indy.jar"),
                 gradleDeployDetails(new DefaultPublishArtifact("groovy-all", "pom", "pom",
null,
-                        curDate, file("$projectDir/target/poms/pom-all.xml")), 'artifacts',
"org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}.pom"),
+                        curDate, file("$projectDir/target/poms/pom-all.xml")), 'artifacts',
+                        "org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}.pom"),
+                gradleDeployDetails(new DefaultPublishArtifact("groovy-all", "pom.asc", "pom.asc",
null,
+                        curDate, file("$projectDir/target/poms/pom-all.xml.asc")), 'artifacts',
+                        "org/codehaus/groovy/groovy-all/${version}/groovy-all-${version}.pom.asc"),
                 gradleDeployDetails(new DefaultPublishArtifact("groovy-binary", "zip", "zip",
null,
-                        curDate, distBin.archivePath), 'artifacts', "org/codehaus/groovy/groovy-binary/${version}/groovy-binary-${version}.zip"),
+                        curDate, distBin.archivePath), 'artifacts',
+                        "org/codehaus/groovy/groovy-binary/${version}/groovy-binary-${version}.zip"),
+                gradleDeployDetails(new DefaultPublishArtifact("groovy-binary", "zip.asc",
"zip.asc", null,
+                        curDate, new File(distBin.destinationDir, distBin.archiveName + '.asc')),
'artifacts',
+                        "org/codehaus/groovy/groovy-binary/${version}/groovy-binary-${version}.zip.asc"),
                 gradleDeployDetails(new DefaultPublishArtifact("groovy-binary", "pom", "pom",
null,
-                        curDate, file("$projectDir/target/poms/pom-binary.xml")), 'artifacts',
"org/codehaus/groovy/groovy-binary/${version}/groovy-binary-${version}.pom"),
+                        curDate, file("$projectDir/target/poms/pom-binary.xml")), 'artifacts',
+                        "org/codehaus/groovy/groovy-binary/${version}/groovy-binary-${version}.pom"),
+                gradleDeployDetails(new DefaultPublishArtifact("groovy-binary", "pom.asc",
"pom.asc", null,
+                        curDate, file("$projectDir/target/poms/pom-binary.xml.asc")), 'artifacts',
+                        "org/codehaus/groovy/groovy-binary/${version}/groovy-binary-${version}.pom.asc"),
 
         ]
         tasks.withType(Jar).matching { it.name.startsWith('backport') }.all {
+            String baseDir = "org/codehaus/groovy/${baseName}/${version}"
             additionalFiles << gradleDeployDetails(
                     new DefaultPublishArtifact(baseName, "jar", "jar", classifier, curDate,
archivePath),
                     'artifacts',
-                    "org/codehaus/groovy/${baseName}/${version}/${archiveName}")
+                    "$baseDir/${archiveName}")
+            additionalFiles << gradleDeployDetails(
+                    new DefaultPublishArtifact(baseName, "jar.asc", "jar.asc", classifier,
curDate, new File(destinationDir, archiveName + '.asc')),
+                    'artifacts',
+                    "$baseDir/${archiveName}.asc")
             if (!classifier) {
+                def pomLocation = "$projectDir/target/poms/pom-${baseName - 'groovy-'}.xml"
+                additionalFiles << gradleDeployDetails(
+                        new DefaultPublishArtifact(baseName, "pom", "pom", null, curDate,
file(pomLocation)),
+                        'artifacts',
+                        "$baseDir/${baseName}-${version}.pom")
+                additionalFiles << gradleDeployDetails(
+                        new DefaultPublishArtifact(baseName, "pom.asc", "pom.asc", null,
curDate, file(pomLocation + '.asc')),
+                        'artifacts',
+                        "$baseDir/${baseName}-${version}.pom.asc")
+            }
+        }
+        allprojects {
+            configurations.archives.artifacts.findAll{ it.name == project.name &&
it.type == 'jar' && it.extension == 'jar' }.each {
+                def pomLocation = "$project.projectDir/target/poms/pom-${project == rootProject
? 'groovy' : 'default'}.xml"
+                String baseDir = "org/codehaus/groovy/${it.name}/${version}"
                 additionalFiles << gradleDeployDetails(
-                        new DefaultPublishArtifact(baseName, "pom", "pom", null, curDate,
file("$projectDir/target/poms/pom-${baseName - 'groovy-'}.xml")),
+                        new DefaultPublishArtifact(it.name, "pom.asc", "pom.asc", null, curDate,
file(pomLocation + '.asc')),
                         'artifacts',
-                        "org/codehaus/groovy/${baseName}/${version}/${baseName}-${version}.pom")
+                        "$baseDir/${it.name}-${version}.pom.asc")
             }
         }
         additionalFiles.each { deployDetails.add(it) }

http://git-wip-us.apache.org/repos/asf/groovy/blob/d5f321ef/gradle/upload.gradle
----------------------------------------------------------------------
diff --git a/gradle/upload.gradle b/gradle/upload.gradle
index 48c660f..7aebc50 100644
--- a/gradle/upload.gradle
+++ b/gradle/upload.gradle
@@ -23,10 +23,10 @@ if (isUsingBintray) {
     logger.lifecycle 'Deployment environment set to Bintray'
 }
 
+def embedded = ['asm', 'asm-util', 'asm-analysis', 'asm-tree', 'asm-commons', 'antlr', 'commons-cli',
'openbeans']
 def removeJarjaredDependencies = { p ->
     p.dependencies.removeAll(p.dependencies.findAll {
-        it.groupId == 'org.codehaus.groovy' ||
-                (['asm', 'asm-util', 'asm-analysis', 'asm-tree', 'asm-commons', 'antlr',
'commons-cli', 'openbeans'].contains(it.artifactId))
+        it.groupId == 'org.codehaus.groovy' || embedded.contains(it.artifactId)
     })
 }
 
@@ -47,14 +47,17 @@ allprojects {
         project.artifacts.add('archives', new File(f.parent, f.name + '.asc')) {
             classifier = c
             type = 'jar.asc'
+            extension = 'jar.asc'
         }
     }
 
     ext.signArchiveTask = { archiveTask ->
         signing.sign(archiveTask.classifier, archiveTask.archivePath)
         project.artifacts.add('archives', new File(archiveTask.destinationDir, archiveTask.archiveName
+ '.asc')) {
+            name = archiveTask.baseName
             classifier = archiveTask.classifier
             type = archiveTask.extension + '.asc'
+            extension = archiveTask.extension + '.asc'
         }
     }
 
@@ -123,7 +126,7 @@ allprojects {
 
 // the root project generates an alternate 'groovy-all' artifact
 [uploadArchives, install]*.with {
-    dependsOn([sourceAllJar, javadocAllJar, groovydocAllJar, distBin])
+    dependsOn([sourceAllJar, javadocAllJar, groovydocAllJar, distBin, distDoc, dist, distBin])
     doFirst {
         project.artifacts.add('archives', jarAll) {
             name = 'groovy-all'
@@ -140,40 +143,23 @@ allprojects {
         project.artifacts.add('archives', distBin) {
             name = 'groovy-binary'
         }
-        tasks.withType(Jar).matching { it.name.startsWith('backport') }.each { t ->
-            project.artifacts.add('archives', t.archivePath) {
-                name = t.baseName
-                type = 'jar'
-                classifier = t.classifier
-            }
-        }
-
-        def indyJar = deriveFile(jarAll.archivePath, 'indy')
-        if (indyJar.exists()) {
-            project.artifacts.add('archives', indyJar)
-        }
-        def grooidJar = deriveFile(jarAll.archivePath, 'grooid')
-        if (grooidJar.exists()) {
-            project.artifacts.add('archives', grooidJar)
-        }
-    }
-}
-
-install {
-    dependsOn([distDoc, dist, distBin])
-    doFirst {
         signArchiveTask(jarAll)
         signArchiveTask(sourceAllJar)
         signArchiveTask(javadocAllJar)
         signArchiveTask(groovydocAllJar)
-        signArchiveTask(distBin)
 
-        // next three are done as a side effect since it was the easiest approach
+        // TODO rework these?
+        signing.sign(distBin)
         signing.sign(distSrc.archivePath)
         signing.sign(distDoc.archivePath)
         signing.sign(dist.archivePath)
 
         tasks.withType(Jar).matching { it.name.startsWith('backport') }.each { t ->
+            project.artifacts.add('archives', t.archivePath) {
+                name = t.baseName
+                type = 'jar'
+                classifier = t.classifier
+            }
             signing.sign(t.classifier, t.archivePath)
             project.artifacts.add('archives', new File(t.destinationDir, t.archiveName +
'.asc')) {
                 name = t.baseName
@@ -184,10 +170,12 @@ install {
 
         def indyJar = deriveFile(jarAll.archivePath, 'indy')
         if (indyJar.exists()) {
+            project.artifacts.add('archives', indyJar)
             signWithClassifier('indy', indyJar)
         }
         def grooidJar = deriveFile(jarAll.archivePath, 'grooid')
         if (grooidJar.exists()) {
+            project.artifacts.add('archives', grooidJar)
             signWithClassifier('grooid', grooidJar)
         }
     }


Mime
View raw message