有没有办法为Gradle上的依赖添加classpath /目录? [英] Is there a way to add classpath/directories for dependencies on Gradle?

查看:2296
本文介绍了有没有办法为Gradle上的依赖添加classpath /目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个新项目,它依赖于遗留项目中的类,而不是jar文件,而是实际的类。
如何让这些目录成为gradle编译的依赖项?

I have a new project, it depends on classes at legacy project, not jar files but actual classes. How can I make these directories a dependency for gradle compile?

推荐答案

dependencies {
    compile files("relative/path/to/classes/dir")
}

有关详细信息,请查阅 Gradle用户指南

For further details, check out the Gradle User Guide.

这篇关于有没有办法为Gradle上的依赖添加classpath /目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆