mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 04:16:02 -04:00
Delete css if bss is generated
This commit is contained in:
parent
a38a1775a0
commit
875b0c27ef
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,4 @@
|
|||||||
*.class
|
*.class
|
||||||
*.bss
|
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
@ -111,12 +111,19 @@ def createExecutable(String suffix, String header) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
doLast {
|
ext.convertToBSS = { resource ->
|
||||||
exec {
|
exclude resource
|
||||||
workingDir new File(this.projectDir, 'src/main/resources/assets/css')
|
doFirst {
|
||||||
commandLine 'javapackager', '-createbss', '-outdir', '.', '-srcdir', '.'
|
def cssFile = new File(this.projectDir, "src/main/resources/" + resource)
|
||||||
|
def bssFile = new File(this.projectDir, "build/compiled-resources/" + resource[0..-4] + "bss")
|
||||||
|
bssFile.parentFile.mkdirs()
|
||||||
|
javafx.css.Stylesheet.convertToBinary cssFile, bssFile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
from "build/compiled-resources"
|
||||||
|
|
||||||
|
convertToBSS "assets/css/root.css"
|
||||||
|
convertToBSS "assets/css/blue.css"
|
||||||
}
|
}
|
||||||
|
|
||||||
task makePack(dependsOn: jar) {
|
task makePack(dependsOn: jar) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user