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
Conversation
dfcdf08
to
347a1c8
Compare
subprojects/docs/src/samples/userguide/files/archives/groovy/build.gradle
Outdated
Show resolved
Hide resolved
subprojects/docs/src/samples/userguide/files/archives/groovy/build.gradle
Outdated
Show resolved
Hide resolved
subprojects/docs/src/samples/userguide/files/archives/groovy/build.gradle
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
<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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
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