Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to extra a subset of an archive and moving it to a new root #8494

Merged
merged 5 commits into from Feb 15, 2019

Conversation

lacasseio
Copy link
Contributor

Context

Fixes: #1108

Add documentation for a comment use case. A bug is still present preventing to properly handle empty directories. However, there is a workaround it. A cleaner solution for that specific case will be done as part of #2940

Gradle Core Team Checklist

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation
  • Recognize contributor in release notes

Copy link
Contributor

@pledbrook pledbrook left a comment

Choose a reason for hiding this comment

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

Looks good. Just an optional request to change the wording of the annotation text. See the inline comment for an example.


.Unpacking a subset of a ZIP file
====
include::sample[dir="userguide/files/archives/groovy",files="build.gradle[tags=unpack-archive-subset-example]"]
include::sample[dir="userguide/files/archives/kotlin",files="build.gradle.kts[tags=unpack-archive-subset-example]"]
====
<1> Extracting only the files under `libs` directly into the destination directory
<2> Remap the extracting files to a different path into the destination directory by dropping the `libs` segment from the file path
Copy link
Contributor

Choose a reason for hiding this comment

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

Please rephrase the annotation text (or I can do it after a merge if you'd like). They should be worded based on asking yourself "what does this line do?" and then answering that question with "It ...". The " ..." is what goes into the annotation.

For example, what does line <1> do? It "extracts only the subset of files that reside in the libs directory.

As I said, I'm more than happy to modify these after you merge if you'd like.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. Let me try something and you can see if it's good.

@lacasseio lacasseio merged commit 5b920be into master Feb 15, 2019
@lacasseio lacasseio deleted the lacasseio/issue-5405 branch February 15, 2019 17:14
lacasseio pushed a commit that referenced this pull request Feb 15, 2019
<3> See Caution note below
<1> Extracts only the subset of files that reside in the `libs` directory
<2> Remaps the path of the extracting files into the destination directory by dropping the `libs` segment from the file path
<3> Ignores the empty directories resulting from the remapping, see Caution note below
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:chore Minor issue without significant impact in:documentation-infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants