Cleanest way in Gradle to get the path to a jar file in the gradle dependency cache

前端 未结 5 551
难免孤独
难免孤独 2021-02-05 00:36

I\'m using Gradle to help automate Hadoop tasks. When calling Hadoop, I need to be able to pass it the path to some jars that my code depends on so that Hadoop can send that de

5条回答
  •  走了就别回头了
    2021-02-05 01:15

    Here is how I did it:

    project.buildscript.configurations.classpath.each {
        String jarName = it.getName();
        print jarName + ":"
    }
    

提交回复
热议问题