Lazy zipTree instantiation for big external zip dependencies

Hello, I have the situation that the zipTree method is lazy but in order to configure it properly while configuration phase I need to pass the file path. So far I did not find a way to get the file path of an external dependency without downloading it. That means the 250MB zip file is downloaded during configuration phase. So every task even the tasks or clean task cause the download which is quite annoying.

Is there a way to get the artifact file path without the artifact itself? Or could I configure the zipTree with some kind of dependency object in order to avoid the path?

To place the zipTree config into a doFirst block did not work so far. The task is always up-to-date then.

task integrationTest(type: Copy, dependsOn: configurations.installation){
  into installationBase
      def zipFile = configurations.installation.find{file->
    file.name.startsWith('installation')
  })
  from(zipTree(zipFile))
}

Thanks, David

Hey David, I think the only workaround at the moment is to put the zipTree statement into a doFirst block or have a dedicated configureIntegrationTestTask that does the work.

cheers, René