You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuweni.apache.org by to...@apache.org on 2019/04/27 08:11:57 UTC
[incubator-tuweni] 49/49: Add signatures to distribution,
add checksum to distribution artifacts
This is an automated email from the ASF dual-hosted git repository.
toulmean pushed a commit to branch 1.0
in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git
commit 7bf4131dc78e786498c5c1168b1ce90492bb0e41
Author: Antoine Toulme <to...@apache.org>
AuthorDate: Sat Apr 27 01:01:59 2019 -0700
Add signatures to distribution, add checksum to distribution artifacts
---
build.gradle | 5 ++---
dist/build.gradle | 28 ++++++++++++++++++++++++++--
2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/build.gradle b/build.gradle
index 33ef5e7..c6132a5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -11,6 +11,7 @@ plugins {
id 'net.ltgt.errorprone' version '0.6'
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
id 'com.github.hierynomus.license' version '0.15.0'
+ id 'org.gradle.crypto.checksum' version '1.1.0'
id 'org.jetbrains.kotlin.jvm' version '1.3.20'
id 'org.jetbrains.dokka' version '0.9.17'
id 'maven-publish'
@@ -267,9 +268,7 @@ allprojects {
if (project.name != 'eth-reference-tests' && project.name != 'dist') {
artifacts {
- if (project != rootProject) {
- archives sourcesJar
- }
+ archives sourcesJar
archives jar
archives dokkaJar
}
diff --git a/dist/build.gradle b/dist/build.gradle
index 0d55d8c..c16c98a 100644
--- a/dist/build.gradle
+++ b/dist/build.gradle
@@ -4,6 +4,14 @@ apply plugin: 'distribution'
jar { enabled = false }
+if (System.getenv('ENABLE_SIGNING') == 'true') {
+ signing {
+ useGpgCmd()
+ sign distZip
+ sign distTar
+ }
+}
+
distributions {
main {
baseName = 'tuweni'
@@ -19,22 +27,28 @@ distributions {
def libs = []
def sources = []
rootProject.subprojects.each { s ->
- if (s.name != 'eth-reference-tests') {
- docs << s.dokkaJar.outputs
+ if (s.name != 'eth-reference-tests' && s.name != 'dist') {
+ libs << s.signArchives.signatureFiles[0]
+ sources << s.signArchives.signatureFiles[1]
+ docs << s.signArchives.signatureFiles[2]
libs << s.jar.outputs
sources << s.sourcesJar.outputs
+ docs << s.dokkaJar.outputs
}
}
into('lib') {
from rootProject.jar
+ from rootProject.signArchives.signatureFiles[0]
from libs
}
into('sources') {
from rootProject.sourcesJar
+ from rootProject.signArchives.signatureFiles[1]
from sources
}
into('docs') {
from rootProject.dokkaJar
+ from rootProject.signArchives.signatureFiles[2]
from docs
}
into('site') {
@@ -45,4 +59,14 @@ distributions {
}
}
+import org.gradle.crypto.checksum.Checksum
+
distTar{ compression = Compression.GZIP }
+
+task createChecksums(type: Checksum, dependsOn: ['distZip', 'distTar']) {
+ files = distZip.outputs.files + distTar.outputs.files
+ outputDir = new File(project.buildDir, "distributions")
+ algorithm = Checksum.Algorithm.SHA512
+}
+
+build.dependsOn('createChecksums')
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org