Am trying to find a way to extract just the root directory name from a zip file. This is what I’m using right now which does work but the visit extracts all of the files/directories in the archive:
Extracting the files from a zip file is a pretty standard requirement, which zipTree helps accomplish. You’re not going to find a specific Gradle shortcut to grab the root directory name without extracting it. You would need to write your own logic to scan through the contents of the zip for this case using the ZipFile classes in the JVM, or similar.