Skip to content

Commit

Permalink
Fix publishing tasks failing due to Gradle implicit dependency.
Browse files Browse the repository at this point in the history
Summary:
Publishing failed due to a Gradle implicit dependency which is described here:
https://youtrack.jetbrains.com/issue/KT-46466/

I'm applying one of the workaround, while we wait for a fix in Kotlin stable.

Reviewed By: zielinskimz

Differential Revision: D45336291

fbshipit-source-id: 7a0ae3653a24e29f21e52d88bb6578ca8efe7281
  • Loading branch information
cortinico authored and facebook-github-bot committed Apr 27, 2023
1 parent 69afb9e commit bd557c7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build-logic/src/main/kotlin/publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,12 @@ signing {
isRequired = !(signingKey.isNullOrBlank() || signingPwd.isNullOrBlank())
}

// Fix for https://youtrack.jetbrains.com/issue/KT-46466/
// On Gradle 8+, the signing task is not correclty wired to the publishing tasks.
// This requires a fix on KGP that is currently pending.
val signingTasks = tasks.withType<Sign>()

tasks.withType<AbstractPublishToMaven>().configureEach { dependsOn(signingTasks) }

val String.byProperty: String?
get() = providers.gradleProperty(this).orNull

0 comments on commit bd557c7

Please sign in to comment.