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.
 
 
 
 
 
 

37 lines
1.0 KiB

group='org.webjars'
def artifactName ="org.webjars.mathcss"
version ="1.0.0"
processResources {
doLast{
//压缩 .js 文件为 .js.gz
FileTree tree =fileTree(dir: "$buildDir/resources/main/META-INF/resources/webjars/mathcss/$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/mathcss/$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
}
}
}