Browse Source

使用gradle构建插件

master
richie 5 years ago
parent
commit
409fe1821c
  1. 3
      .gitignore
  2. 7
      build.gradle
  3. 0
      encrypt.xml

3
.gitignore vendored

@ -3,3 +3,6 @@
lib/report/*.jar lib/report/*.jar
.DS_Store .DS_Store
.classpath .classpath
.gradle
build
local.properties

7
build.gradle

@ -11,7 +11,8 @@ ext{
// jar需要打包到zip中,/lib目录下 // jar需要打包到zip中,/lib目录下
libPath = "$projectDir/webroot/WEB-INF/lib" libPath = "$projectDir/webroot/WEB-INF/lib"
def pluginInfo = getPluginInfo() def pluginInfo = getPluginInfo()
pluginPre = "fr-plugin" pluginPre = "fine-plugin"
// id
pluginName = pluginInfo.id pluginName = pluginInfo.id
pluginVersion = pluginInfo.version pluginVersion = pluginInfo.version
} }
@ -52,7 +53,7 @@ publishing {
} }
} }
ant.importBuild("ant_build.xml") ant.importBuild("encrypt.xml")
//ant变量 //ant变量
ant.projectDir = projectDir ant.projectDir = projectDir
ant.references["compile.classpath"] = ant.path { ant.references["compile.classpath"] = ant.path {
@ -94,7 +95,7 @@ task copyFile(type: Copy,dependsOn: ["makeJar"]){
include "*.jar" include "*.jar"
} }
from "$projectDir/plugin.xml" 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"]){ task zip(type:Zip,dependsOn:["copyFile"]){

0
ant_build.xml → encrypt.xml

Loading…
Cancel
Save