Skip to content

Conversation

@snazy
Copy link
Contributor

@snazy snazy commented Nov 17, 2025

aka: "which dependencies contain the path XYZ"

Refs #1848.


  • CHANGELOG's "Unreleased" section has been updated, if applicable.

@snazy snazy force-pushed the conv-task-find branch 2 times, most recently from 29eb542 to da91cb0 Compare November 18, 2025 08:27
Comment on lines 36 to 38
"/my/a/1.0/a-1.0.jar".invariantSeparatorsPathString,
"/a.properties".invariantSeparatorsPathString,
"/a2.properties".invariantSeparatorsPathString,
Copy link
Member

Choose a reason for hiding this comment

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

Seems you need variantSeparatorsPathString instead of invariantSeparatorsPathString.

Copy link
Member

Choose a reason for hiding this comment

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

@Goooler Goooler changed the title Add a convenience task to find resources in dependencies Add FindResourceInClasspath task to find resources in dependencies Nov 18, 2025
@Goooler Goooler requested a review from Copilot November 18, 2025 09:45

This comment was marked as outdated.

Goooler and others added 3 commits November 18, 2025 17:49
…ks/FindResourceInClasspath.kt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
classpath.forEach { file ->
logger.lifecycle("scanning {}", file)

archiveOperations.zipTree(file).matching(patternSet).forEach { entry ->
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if the files will be unzipped for once when the task is executed. If the answer is not, we can mark the task @DisableCachingByDefault.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@DisableCachingByDefault SGTM. It's a debugging convenience tasks anyway, so caching might be counter productive.
I'm not sure whether some zipTree related artifacts end on disk (somewhere in build/tmp) as a byproduct of what the implementation needs. But there's no cacheable output.

@Goooler Goooler merged commit 90eb380 into GradleUp:main Nov 18, 2025
7 checks passed
@snazy snazy deleted the conv-task-find branch November 18, 2025 12:36
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.

2 participants