Motivation: I’m working on development framework. I would like to create offline (zip) bundle of the framework. It means bundle contains all framework artifacts and its dependencies.
A developer can download the bundle, unzip it, create new application from template, it has maven repo configured with file url the bundle is unzipped to. Now, you can be offline to build the new application that uses my framework. No dependencies are downloaded from internet because all necesarry artifacts are placed in the framework installation directory.
But application that uses my development framework still follow common development and gradle build practices. It means it still uses common maven central and local repositories configured. Developer can use another libraries (that are not part of the framework bundle or newer version of them) that will be downloaded from internet.
My tries to achieve it: I can iterate configuration.runtime and configuration.compile of application template. List of files is perfect but it is just File. I could use it to store it to flat dir. But it is not what I want to do. I miss meta informations about such artifact - name, group, version, dependencies.
I also tried to iterate configurations.allDependencies what has some advantage. It returns meta informations but about only direct dependencies. Info about transitive dependencies are missing. And I also don’t know how to get info about file and it’s POM file URL.
I think gradle provides everything I need to do but I do not know all gradle parts to do it. I need something like my custom proxy repository provider that will delegate to gradle cache to collect all artifact used by project. Or I need to iterate dependency tree and be able to find its file and POM or Ivy metadata file.
It does not matter what format the exported dependencies follow. It can follow maven local offline repository or it can be ivy local offline repository or some gradle specific. I just want to prepare dependencies in structure other gradle projects can use in offline mode.
I hope you understand my motivation. And thanks in advance for your answers.
Best regards, -lk