How to add local .jar file dependency to build.gradle file?

前端 未结 17 2064
攒了一身酷
攒了一身酷 2020-11-21 23:23

So I have tried to add my local .jar file dependency to my build.gradle file:

apply plugin: \'java\'

sourceSets {
    main {
        java {
            srcD         


        
17条回答
  •  长发绾君心
    2020-11-21 23:50

    The Question already has been answered in detail. I still want to add something that seems very surprising to me:

    The "gradle dependencies" task does not list any file dependencies. Even though you might think so, as they have been specified in the "dependencies" block after all..

    So don't rely on the output of this to check whether your referenced local lib files are working correctly.

提交回复
热议问题