Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gradle 8 publishing issue #1904

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,6 @@ group = 'com.github.broadinstitute'

defaultTasks 'all'

distZip {
dependsOn 'currentJar'
}

distTar {
dependsOn 'currentJar'
}

startScripts {
dependsOn 'currentJar'
}

startShadowScripts {
dependsOn 'currentJar'
}

Comment on lines -102 to -117
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option a) Multiple independent dependencies

task all(dependsOn: ['jar', 'distZip', 'javadoc', 'shadowJar', 'currentJar', 'picardDoc'])

// Source file names for the picard command line properties file. We select and include only one of
Expand Down Expand Up @@ -416,3 +400,12 @@ gitPublish {
gitPublishCopy {
dependsOn 'updateGhPages', 'copyJavadoc', 'copyPicardDoc'
}

// For Gradle 8 explicitly add 'currentJar' as a dependency of the following tasks.
// For more information, please refer to
// https://docs.gradle.org/8.2.1/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
['distZip', 'distTar', 'startScripts', 'startShadowScripts', 'generateMetadataFileForPicardPublication'].each {
tasks.named(it).configure {
dependsOn 'currentJar'
}
}
Comment on lines +404 to +411
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option b) Use a loop to put them all in one place

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like there is probably a more idiomatic way to do this by adding it to the java component or something like that, but I don't know how and it doesn't seem worthwhile to figure it. This is way better than a zillion individual closures adding it.

Loading