zoukankan      html  css  js  c++  java
  • gradle多项目 svn依赖

    当svn有多个子项目且没有根项目的时候,用eclipse拷贝下来是容易出问题的,经常子项目之间的依赖会有问题,还是推荐用IDEA。

    操作说明:

    如果SVN有 A,B,C,D四个项目,A为web项目,B为给客户端的接口应用,C为公共应用,D为DAO应用

    A,B,C,D都是以zt开头的命名

    先在IDEA的项目目录新建A,B,C,D四个项目名目录,再新建一个zt-integration文件夹再在zt-integration文件夹下建一个build.gradle文件,里面不写内容,再建一个settings.gradle文件,里面内容为:

    boolean buildAll = System.getProperty('all', '1') == '1'
    if (buildAll) {
        String[] upDirs = new File('../').list(new FilenameFilter() {
            public boolean accept(File dir, String name) {
                return name.startsWith("zt") && !name.endsWith('integration');
            }
        });
    
        println "包含子工程:$upDirs"
    
        includeFlat upDirs
    }
    

    然后再在每个目录下check out对应的项目代码。

    打开IDEA,然后File-->new-->project from existing Source 把zt-integration导入进来,就会把子项目加进来

    各个子项目的依赖用 compile project(':其他子项目名')

  • 相关阅读:
    DNS服务器详解
    numpy学习
    test_pandas
    1.爬虫基本介绍
    数据分析介绍及软件使用 01
    3.解析库beautifulsoup
    jQuery UI vs EasyUI
    "file:///" file 协议
    Display:Block
    前端响应式设计中@media等的相关运用
  • 原文地址:https://www.cnblogs.com/JAYIT/p/8821768.html
Copyright © 2011-2022 走看看