Get destination of sources within zip

I am configuring a gradle task to perform operations based on files to be included in another Zip task, the following works fine:

project.getTasks().withType(Zip.class).all(zipTask -> {
    final OtherTask otherTask = project.getTasks().create(zipTask.getName() + "Thinner", OtherTask.class, thinnerTask -> {
        thinnerTask.source(zipTask.getSource());
    }
}

However, I also want to get information on where each source file is expected to be placed within the zip, something like:

Map<File, String> sourceToDestPath = zipTask.getSourceToDestPath();

Where the key, File is the source file on the local machine running the build and the value String is the relative path within the zip where this file will be placed.

Is there any way to accomplish this? Note that zipTask.getRootSpec().eachFile(f -> f.getPath()) does not work for me because the closure runs at copy time…and that’s too late. I need to configure a task that the zip task depends on with this information so I can’t wait that long for them.