Browse Source

打包名取plugin.xml的id和version属性

pull/5/head
tianxx7 4 years ago
parent
commit
522d6f5c70
  1. 11
      build.gradle

11
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]
}

Loading…
Cancel
Save