zoukankan      html  css  js  c++  java
  • makeJar

    task makeJar(type: Jar) {
    //指定生成的jar名
    baseName 'plugin'
    //从哪里打包class文件
    from('build/intermediates/classes/debug/com/xhrd/mobile/hybridframework/plugin/')
    //打包到jar后的目录结构
    into('com/xhrd/mobile/hybridframework/plugin/')
    //去掉不需要打包的目录和文件
    exclude('test/', 'BuildConfig.class', 'R.class')
    //去掉R$开头的文件
    exclude{ it.name.startsWith('R$');}
    }

    task makeJar2(type: Jar){
    archiveName = "myJarName.jar"
    from('build/intermediates/classes/debug/com/xhrd/mobile/hybridframework/plugin/'){
    exclude('BuildConfig.class', 'R.class')
    //去掉R$开头的文件
    exclude{ it.name.startsWith('R$');}
    }
    //打包到jar后的目录结构
    into('com/xhrd/mobile/hybridframework/plugin/')
    }



    http://stackoverflow.com/questions/11474729/how-to-build-sources-jar-with-gradle
    http://www.alloyteam.com/2015/03/shi-yong-gradle-da-bao-zhi-ding-bao-ming-he-lei-di-jar/
  • 相关阅读:
    HTML5中drag和drop使用
    E
    D
    杜教BM(解决线性递推式的模板)
    Myeclipse下载安装破解详细版
    D
    IDEA-连接MySQL连不上
    E
    C
    D. Ball(树状数组三维排序,求是否存在三个值都比自己大的人)
  • 原文地址:https://www.cnblogs.com/maxinliang/p/4634206.html
Copyright © 2011-2022 走看看