From 9adc12125e2c134826ed4239bb01b323ae863f6c Mon Sep 17 00:00:00 2001 From: tianxx7 <1729549607@qq.com> Date: Tue, 19 May 2020 14:06:22 +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=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin-function/build.gradle | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/plugin-function/build.gradle b/plugin-function/build.gradle index 59efeea..bd1e998 100644 --- a/plugin-function/build.gradle +++ b/plugin-function/build.gradle @@ -5,3 +5,28 @@ dependencies { implementation fileTree(dir: 'lib', include: ['*.jar']) } +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/install") + //生成的文件名: baseName-appendix-0.0.1.zip +// baseName 'baseName' +// appendix 'appendix' +// version '0.0.1' +} +//先清理再build +build.mustRunAfter clean +//控制build时包含哪些文件,排除哪些文件 +processResources { +// exclude everything +// 用*.css没效果 +// exclude '**/*.css' +// except this file +// include 'xx.xml' +}