From 409fe1821c744ea1e4ba8fd61ae24830f9a0cfcc Mon Sep 17 00:00:00 2001 From: richie Date: Thu, 28 May 2020 16:45:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8gradle=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 ++++- build.gradle | 7 ++++--- ant_build.xml => encrypt.xml | 0 3 files changed, 8 insertions(+), 4 deletions(-) rename ant_build.xml => encrypt.xml (100%) diff --git a/.gitignore b/.gitignore index d91e065..0446c30 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ .idea/ lib/report/*.jar .DS_Store -.classpath \ No newline at end of file +.classpath +.gradle +build +local.properties \ No newline at end of file diff --git a/build.gradle b/build.gradle index b6731d3..0c114a3 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,8 @@ ext{ // 如果依赖的jar需要打包到zip中,放置在/lib目录下 libPath = "$projectDir/webroot/WEB-INF/lib" def pluginInfo = getPluginInfo() - pluginPre = "fr-plugin" + pluginPre = "fine-plugin" + // 这里读取的是插件的id,开发者可修改为固定的名字 pluginName = pluginInfo.id pluginVersion = pluginInfo.version } @@ -52,7 +53,7 @@ publishing { } } -ant.importBuild("ant_build.xml") +ant.importBuild("encrypt.xml") //定义ant变量 ant.projectDir = projectDir ant.references["compile.classpath"] = ant.path { @@ -94,7 +95,7 @@ task copyFile(type: Copy,dependsOn: ["makeJar"]){ include "*.jar" } from "$projectDir/plugin.xml" - into file("$buildDir/temp/fr-plugin-"+"$pluginName"+"-$pluginVersion") + into file("$buildDir/temp/" + "$pluginPre"+"-$pluginName"+"-$pluginVersion") } task zip(type:Zip,dependsOn:["copyFile"]){ diff --git a/ant_build.xml b/encrypt.xml similarity index 100% rename from ant_build.xml rename to encrypt.xml