mirror of
https://github.com/apple/pkl.git
synced 2026-04-14 04:29:43 +02:00
Skip POM validation for unpublished projects
This small change fixes a bug introduced by the `validatePom` task within the `pklPublishLibrary` plugin. When running project-wide tasks like `./gradle tasks`, projects which don't provide a POM fail the build, because the `generatePomFileForLibraryPublication` cannot be found, but it is expected to be present. Fixes and closes apple/pkl#215 Signed-off-by: Sam Gammon <sam@elide.ventures>
This commit is contained in:
committed by
Philip K.F. Hölzenspies
parent
fc0f6f1ef0
commit
cb33a7cdb0
@@ -50,6 +50,9 @@ publishing {
|
||||
}
|
||||
|
||||
val validatePom by tasks.registering {
|
||||
if (tasks.findByName("generatePomFileForLibraryPublication") == null) {
|
||||
return@registering
|
||||
}
|
||||
val generatePomFileForLibraryPublication by tasks.existing(GenerateMavenPom::class)
|
||||
val outputFile = file("$buildDir/validatePom") // dummy output to satisfy up-to-date check
|
||||
|
||||
|
||||
Reference in New Issue
Block a user