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.
38 lines
1.0 KiB
38 lines
1.0 KiB
8 months ago
|
group ="org.webjars"
|
||
|
def artifactName ="org.webjars.codemirror"
|
||
|
version ="5.37.0"
|
||
|
|
||
|
processResources {
|
||
|
doLast{
|
||
|
//压缩 .js 文件为 .js.gz
|
||
|
FileTree tree =fileTree(dir: "$buildDir/resources/main/META-INF/resources/webjars/tailwindcss/$version", 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/tailwindcss/$version", include: "**/*.css")
|
||
|
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
|
||
|
}
|
||
|
}
|
||
|
}
|