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

前端 未结 5 620
难免孤独
难免孤独 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:17

    Your code can be simplified a bit, for example project.configurations.compile.find { it.name.startsWith("solr-solrj-") }.

提交回复
热议问题