From 43d92b7e1e420f8d537b045421b08c4c7604212e Mon Sep 17 00:00:00 2001 From: tianxx7 <1729549607@qq.com> Date: Tue, 19 May 2020 14:08:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8gradle=E6=89=93=E6=88=90?= =?UTF-8?q?=E5=92=8Cant=E4=B8=80=E6=A0=B7=E7=9A=84zip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 836f58c..6774b3b 100644 --- a/build.gradle +++ b/build.gradle @@ -9,10 +9,20 @@ dependencies { //这个不可以使用form /libs/*.*的通配符, //可以使用from指定具体的文件名 //将生成的zip输出到$buildDir下 -task zip(type:Zip,dependsOn:["build"]){ +task copyFile(type:Copy,dependsOn: ["build"]){ from "$buildDir/libs" + from "$projectDir/lib" from "$projectDir/plugin.xml" + into file("$buildDir/temp/fr-"+"$project.name"+"-$project.version") +} + +task zip(type:Zip,dependsOn:["copyFile"]){ + from "$buildDir/temp" destinationDir file("$buildDir") + //生成的文件名 baseName-appendix-0.0.1.zip +// baseName 'baseName' +// appendix 'appendix' +// version '0.0.1' } //先清理再build build.mustRunAfter clean