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

前端 未结 17 2044
攒了一身酷
攒了一身酷 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:47

    You could also do this which would include all JARs in the local repository. This way you wouldn't have to specify it every time.

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
    }
    

提交回复
热议问题