diff --git a/build.gradle b/build.gradle index 66549201a..860a0f6f6 100644 --- a/build.gradle +++ b/build.gradle @@ -120,7 +120,7 @@ tasks.named('asciidoctor', AsciidoctorTask).configure { } tasks.register('dist', Zip) { - dependsOn assemble, asciidoctor + //dependsOn jar, javadocJar, sourcesJar, asciidoctor destinationDirectory = layout.buildDirectory.dir('dist') from jar.outputs @@ -143,22 +143,7 @@ tasks.register('dist', Zip) { from(configurations.runtimeClasspath) { into 'lib' } - def chacha64 = project('chacha64-plugin') - from chacha64.jar.outputs - from chacha64.javadocJar.outputs - from chacha64.sourcesJar.outputs - from(chacha64.configurations.runtimeClasspath) { - exclude 'jaybird-*' - into 'lib' - } - def jaybirdNative = project('jaybird-native') - from jaybirdNative.jar.outputs - from jaybirdNative.javadocJar.outputs - from jaybirdNative.sourcesJar.outputs - from(jaybirdNative.configurations.runtimeClasspath) { - exclude 'jaybird-*' - into 'lib' - } + // NOTE: Inclusion of files from sub-projects is handled in their respective build.gradle files } jar { diff --git a/chacha64-plugin/build.gradle b/chacha64-plugin/build.gradle index 9e5c569b6..71d12ff98 100644 --- a/chacha64-plugin/build.gradle +++ b/chacha64-plugin/build.gradle @@ -52,6 +52,17 @@ javadoc { options.addBooleanOption('Xdoclint:none', true) } +parent.tasks.named('dist', Zip) { + from jar.outputs + from javadocJar.outputs + from sourcesJar.outputs + from(configurations.runtimeClasspath) { + exclude 'jaybird-*' + exclude 'jspecify-*' + into 'lib' + } +} + publishing { publications { // chacha-64 maven artifact diff --git a/devdoc/publish.md b/devdoc/publish.md index ca9e5ad2c..187550182 100644 --- a/devdoc/publish.md +++ b/devdoc/publish.md @@ -4,12 +4,13 @@ Publishing To publish to Maven use ``` -gradlew clean publish -PcredentialsPassphrase= +gradlew clean assemble publish -PcredentialsPassphrase= ``` - Where `` is the password used to add the credentials (see also below). +The `assemble` task is not strictly necessary, but will also generate the `dist` +zip and sign it. Publishing to Maven Central (non-SNAPSHOT releases) requires an explicit close and release through . diff --git a/jaybird-native/build.gradle b/jaybird-native/build.gradle index 6edc82cb3..62cfdd9e6 100644 --- a/jaybird-native/build.gradle +++ b/jaybird-native/build.gradle @@ -54,6 +54,17 @@ javadoc { options.addBooleanOption('Xdoclint:none', true) } +parent.tasks.named('dist', Zip) { + from jar.outputs + from javadocJar.outputs + from sourcesJar.outputs + from(configurations.runtimeClasspath) { + exclude 'jaybird-*' + exclude 'jspecify-*' + into 'lib' + } +} + publishing { publications { // jaybird-native maven artifact diff --git a/publish.gradle b/publish.gradle index 664b996bd..516135030 100644 --- a/publish.gradle +++ b/publish.gradle @@ -185,4 +185,5 @@ allprojects { signing { required { isReleaseVersion && gradle.taskGraph.hasTask(':publish') } sign publishing.publications.jaybird + sign dist }