Skip to content

Issue 1090: Update annotations on custom Tasks to enable strict plugin validation#244

Open
labkey-susanh wants to merge 4 commits intodevelopfrom
fb_pluginValidation
Open

Issue 1090: Update annotations on custom Tasks to enable strict plugin validation#244
labkey-susanh wants to merge 4 commits intodevelopfrom
fb_pluginValidation

Conversation

@labkey-susanh
Copy link
Copy Markdown
Contributor

@labkey-susanh labkey-susanh commented May 8, 2026

Rationale

Issue 1090: Stricter plugin validation was added in 9.4.0. The validation changes are meant to help with using the build cache. We use this on TeamCity if not for local builds. Keeping plugins compatible with the now-default behavior will reduce potential headaches.

Related Pull Requests

Changes

  • Add BuildUtils.hasArtifactoryProperties method for brevity
  • Add cacheability annotations to tasks so they work with stricter plugin validation
  • Add @PathSensitive annotations for a number of input properties

import org.gradle.api.Action
import org.gradle.api.Task
import org.gradle.api.file.FileTree
import org.gradle.api.tasks.UntrackedTask
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

unused import

Suggested change
import org.gradle.api.tasks.UntrackedTask

Comment on lines 183 to +184
// N.B. Using Authorization Bearer with an API token does not currently work
httpPost.setHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString("${project.property('artifactory_user')}:${project.property('artifactory_password')}".getBytes()))
httpPost.setHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString("${project.property(BuildUtils.ARTIFACTORY_USER_PROP)}:${project.property(BuildUtils.ARTIFACTORY_PASSWORD_PROP)}".getBytes()))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

JFrog claims to support bearer tokens now. https://docs.jfrog.com/administration/docs/access-tokens#authorization-headers
No need to change it now but something to consider for the future.

import org.gradle.api.tasks.PathSensitive
import org.gradle.api.tasks.PathSensitivity
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.UntrackedTask
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
import org.gradle.api.tasks.UntrackedTask

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants