美文网首页
android gradle 3.0前打包jar

android gradle 3.0前打包jar

作者: wilken | 来源:发表于2018-07-26 16:05 被阅读0次

//打jar包

def SDK_BASENAME = "xxsdk";

def sdkJarPath = "build";

def SDK_VERSION = "_v1.0.0";

//gradle 3.0之前

def zipFile = file('build/intermediates/bundles/release/classes.jar')

//新建一个任务task

task makeJar(type: Jar) {

    //拿到jar

        from zipTree(zipFile)

    //拿到项目目录的assets资源文件

        from fileTree(dir: 'src/main', includes: ['assets/**'])

//命名

        baseName = SDK_BASENAME + SDK_VERSION

//jar 跟 assets一起打包

        destinationDir = file("build")

}

makeJar.dependsOn(build)

相关文章

网友评论

      本文标题:android gradle 3.0前打包jar

      本文链接:https://www.haomeiwen.com/subject/hymbmftx.html