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.
With this change applied, validatePom only runs if the task generatePomFileForLibraryPublication is present in a given project.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/apple/pkl/pull/216
**Author:** [@sgammon](https://github.com/sgammon)
**Created:** 2/20/2024
**Status:** ✅ Merged
**Merged:** 2/21/2024
**Merged by:** [@holzensp](https://github.com/holzensp)
**Base:** `main` ← **Head:** `fix/gradle-tasks-cmd`
---
### 📝 Commits (1)
- [`663f0fa`](https://github.com/apple/pkl/commit/663f0faab3b11351613ec9bf436d0ce8e48d9321) Skip POM validation for unpublished projects
### 📊 Changes
**1 file changed** (+3 additions, -0 deletions)
<details>
<summary>View changed files</summary>
📝 `buildSrc/src/main/kotlin/pklPublishLibrary.gradle.kts` (+3 -0)
</details>
### 📄 Description
## Summary
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.
With this change applied, `validatePom` only runs if the task `generatePomFileForLibraryPublication` is present in a given project.
Fixes and closes apple/pkl#215
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/216
Author: @sgammon
Created: 2/20/2024
Status: ✅ Merged
Merged: 2/21/2024
Merged by: @holzensp
Base:
main← Head:fix/gradle-tasks-cmd📝 Commits (1)
663f0faSkip POM validation for unpublished projects📊 Changes
1 file changed (+3 additions, -0 deletions)
View changed files
📝
buildSrc/src/main/kotlin/pklPublishLibrary.gradle.kts(+3 -0)📄 Description
Summary
This small change fixes a bug introduced by the
validatePomtask within thepklPublishLibraryplugin. When running project-wide tasks like./gradle tasks, projects which don't provide a POM fail the build, because thegeneratePomFileForLibraryPublicationcannot be found, but it is expected to be present.With this change applied,
validatePomonly runs if the taskgeneratePomFileForLibraryPublicationis present in a given project.Fixes and closes apple/pkl#215
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.