diff --git a/build.gradle b/build.gradle index 5b7e506..b6731d3 100644 --- a/build.gradle +++ b/build.gradle @@ -10,16 +10,19 @@ ext{ // 项目中依赖的jar的路径 // 如果依赖的jar需要打包到zip中,放置在/lib目录下 libPath = "$projectDir/webroot/WEB-INF/lib" + def pluginInfo = getPluginInfo() pluginPre = "fr-plugin" - pluginName = "extendedCharts" - pluginVersion = getVersion() + pluginName = pluginInfo.id + pluginVersion = pluginInfo.version } /*读取plugin.xml中的version*/ -def getVersion(){ +def getPluginInfo(){ def xmlFile = "./plugin.xml" def plugin = new XmlParser().parse(xmlFile) - return plugin.version[0].text() + def version = plugin.version[0].text() + def id = plugin.id[0].text() + return ["id":id,"version":version] }