gradle repository points to local directory with multiple libs

人走茶凉 提交于 2019-12-05 18:38:02

It should depend on what pattern is passed. fileTree is defined on Project and returns an instance of ConfigurableFileTree. As you can see, one of ConfigurableFileTree super-interfaces is PatternFilterable which has patterns well documented e.g.:

 all files ending with 'jsp' (including subdirectories)
    **/*.jsp

So I guess to include subdirectories you just need to change the pattern:

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

In general ant-style patterns are used:

A PatternFilterable represents some file container which Ant-style include and exclude patterns or specs can be applied to.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!