This commit is contained in:
2022-01-25 15:21:01 +06:00
parent 3746efc596
commit e4dfdc07fc
595 changed files with 59923 additions and 47 deletions

View File

@@ -32,3 +32,62 @@ dependencies {
api "org.jetbrains.exposed:exposed-jdbc:$kotlin_exposed_version"
api "org.postgresql:postgresql:$psql_version"
}
task copyClient(type: Copy) {
dependsOn ":postssystem.client:jsBrowserDistribution"
File clientSources = project(":postssystem.client").file("build/distributions")
SourceDirectorySet resources = sourceSets.main.resources
File webFolderPath = new File(resources.getSrcDirs()[0].toString(), "web")
exclude("*.map")
from clientSources.absolutePath
into webFolderPath.absolutePath
}
tasks.getByName("compileKotlin")
.dependsOn(project(":postssystem.client").jsBrowserDistribution)
.dependsOn(copyClient)
tasks.getByName("compileKotlin").configure {
mustRunAfter project(":postssystem.client").jsBrowserDistribution
mustRunAfter copyClient
}
tasks.getByName("run")
.dependsOn(project(":postssystem.client").jsBrowserDistribution)
.dependsOn(copyClient)
tasks.getByName("run").configure {
mustRunAfter project(":postssystem.client").jsBrowserDistribution
mustRunAfter copyClient
}
task copyUIKitCSS(type: Copy) {
dependsOn ":postssystem.client.uikit:build"
File dist = project(":postssystem.client.uikit").file("dist")
SourceDirectorySet resources = sourceSets.main.resources
File webFolderPath = new File(resources.getSrcDirs()[0].toString(), "web")
File cssFilesFolder = new File(dist, "css")
from cssFilesFolder.absolutePath
include "uikit.min.css"
into new File(webFolderPath, "css").absolutePath
}
task copyUIKitJS(type: Copy) {
dependsOn ":postssystem.client.uikit:build"
File dist = project(":postssystem.client.uikit").file("dist")
SourceDirectorySet resources = sourceSets.main.resources
File webFolderPath = new File(resources.getSrcDirs()[0].toString(), "web")
File jsFilesFolder = new File(dist, "js")
from jsFilesFolder.absolutePath
include "uikit.min.js"
include "uikit-icons.min.js"
into new File(webFolderPath, "js").absolutePath
}
tasks.getByName("processResources")
.dependsOn(copyUIKitJS)
.dependsOn(copyUIKitCSS)
tasks.getByName("processResources").configure {
mustRunAfter copyUIKitJS
mustRunAfter copyUIKitCSS
}