gradle -- 依赖管理

来源:互联网 发布:python web开发面试题 编辑:程序博客网 时间:2024/05/02 17:48

声明依赖:

apply plugin: 'java'repositories { mavenCentral()}dependencies { compile group: 'org.hibernate' , name: 'hibernate-core' , version: '3.6.7.Final' testCompile group: 'junit' , name: 'junit' , version: '4.+'}


以上的build.gradle文件中,是使用maven仓库

repositories { maven { url "http://repo.mycompany.com/maven2" }}


也可以使用 Ivy

repositories { ivy { url "http://repo.mycompany.com/repo" }}



当然,也可以使用本地文件系统,Maven和Ivy都可以

repositories { ivy { // URL can refer to a local directory url "../local-repo" }}



repositories

0 0
原创粉丝点击