Browse Source

使用gradle打成和ant一样的zip

master
tianxx7 5 years ago
parent
commit
43d92b7e1e
  1. 12
      build.gradle

12
build.gradle

@ -9,10 +9,20 @@ dependencies {
//使form /libs/*.*,
//使from指定具体的文件名
//zip输出到$buildDir下
task zip(type:Zip,dependsOn:["build"]){
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")
// baseName-appendix-0.0.1.zip
// baseName 'baseName'
// appendix 'appendix'
// version '0.0.1'
}
//build
build.mustRunAfter clean

Loading…
Cancel
Save