You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

50 lines
1.5 KiB

group='io.sc'
def artifactName ="io.sc.webjars"
processResources {
doLast{
//============================================
// luckysheet
//============================================
//压缩 .js 文件为 .js.gz
FileTree tree =fileTree(dir: "$buildDir/resources/main/META-INF/resources/webjars/luckysheet/2.1.13", include: "**/*.js")
tree.each {File file ->
String fileName = file.getName()
println fileName + " => " + fileName + ".gz"
ant.gzip(src: file, destfile:file.toString() + ".gz")
}
//压缩 .css 文件为 .css.gz
tree =fileTree(dir: "$buildDir/resources/main/META-INF/resources/webjars/luckysheet/2.1.13", include: "**/*.css")
tree.each {File file ->
String fileName = file.getName()
println fileName + " => " + fileName + ".gz"
ant.gzip(src: file, destfile:file.toString() + ".gz")
}
//============================================
// tailwindcss
//============================================
//压缩 .js 文件为 .js.gz
tree =fileTree(dir: "$buildDir/resources/main/META-INF/resources/webjars/tailwindcss/3.4.5", include: "**/*.js")
tree.each {File file ->
String fileName = file.getName()
println fileName + " => " + fileName + ".gz"
ant.gzip(src: file, destfile:file.toString() + ".gz")
}
}
}
//采用指定的名称作为打包后的归档文件名称
jar {
archiveBaseName=artifactName
}
//采用指定的名称作为发布到 maven 仓库中的归档文件名称
publishing{
publications{
publication(MavenPublication){
artifactId artifactName
}
}
}