From 70e4d875569532af2282d0d18830f091bf6aa99e Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Mon, 13 Aug 2018 07:04:13 -0700 Subject: [PATCH] Do not attempt to sign the root jar and sources --- build.gradle | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index b750e642..ae5e6662 100644 --- a/build.gradle +++ b/build.gradle @@ -155,14 +155,16 @@ allprojects { } } - jar { - destinationDir = file("${rootProject.buildDir}/libs") - } + if (project != rootProject) { + jar { + destinationDir = file("${rootProject.buildDir}/libs") + } - task sourcesJar(type: Jar, dependsOn: classes) { - destinationDir = file("${rootProject.buildDir}/src") - classifier = 'sources' - from sourceSets.main.allSource + task sourcesJar(type: Jar, dependsOn: classes) { + destinationDir = file("${rootProject.buildDir}/src") + classifier = 'sources' + from sourceSets.main.allSource + } } task dokkaJar(type: Jar, dependsOn: dokka) { @@ -172,18 +174,16 @@ allprojects { } if (project.name != 'eth-reference-tests') { - signing { - useGpgCmd() - sign configurations.archives - } tasks.withType(Sign) { onlyIf { System.getenv('ENABLE_SIGNING') == 'true' } } artifacts { - archives jar - archives sourcesJar + if (project != rootProject) { + archives jar + archives sourcesJar + } archives dokkaJar } @@ -276,6 +276,11 @@ allprojects { } } + signing { + useGpgCmd() + sign publishing.publications.MavenDeployment + } + def artifactIdMatcher = Pattern.compile("(.*)-\\d.*") bintray { user = System.getenv('BINTRAY_USER')