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.
51 lines
1.5 KiB
51 lines
1.5 KiB
5 months ago
|
group='io.sc'
|
||
|
def artifactName ="io.sc.webjars"
|
||
1 year ago
|
|
||
|
processResources {
|
||
|
doLast{
|
||
5 months ago
|
//============================================
|
||
|
// luckysheet
|
||
|
//============================================
|
||
1 year ago
|
//压缩 .js 文件为 .js.gz
|
||
5 months ago
|
FileTree tree =fileTree(dir: "$buildDir/resources/main/META-INF/resources/webjars/luckysheet/2.1.13", include: "**/*.js")
|
||
1 year ago
|
tree.each {File file ->
|
||
|
String fileName = file.getName()
|
||
|
println fileName + " => " + fileName + ".gz"
|
||
|
ant.gzip(src: file, destfile:file.toString() + ".gz")
|
||
|
}
|
||
|
|
||
|
//压缩 .css 文件为 .css.gz
|
||
5 months ago
|
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")
|
||
1 year ago
|
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
|
||
|
}
|
||
|
}
|
||
|
}
|