I need to do a few things:

  1. Build a jar (can be done through dependencies)
  2. Pass the jar through ProGuard (there is already a task. It is also done through dependencies)
  3. "Dump" my ProGuard jar'ku and all dependencies (either) in one folder (plz help)
  4. Calculate md5 of all files, pack them in json and send to the server with files from 4 points.

For the last item, I have a separate jar, when I run it with the necessary parameters, I get everything that I need. It remains only to ask Gradle to execute my jar with its parameters.
How to do it?

PS how to implement 3 points?

    1 answer 1

    The third item: Copy task allows you to copy the specified files in the desired folder:

    task initConfig(type: Copy) { from('proguard') { include '**/my.jar' } from('libs') { include '**/*.jar' } into 'target' } 

    Starting jar: To run the jar there is a JavaExec task :

     task send_md5(type: JavaExec) { classpath = '/path/to/send_md5.jar' main = 'send_md5.Main' // параметры args 'tramparam' }