2021-11-24 07:52:27 +00:00
|
|
|
plugins {
|
|
|
|
id "org.jetbrains.kotlin.jvm"
|
|
|
|
id "org.jetbrains.kotlin.plugin.serialization"
|
|
|
|
id "application"
|
|
|
|
}
|
|
|
|
|
|
|
|
version = null
|
|
|
|
|
|
|
|
application {
|
|
|
|
mainClass = 'dev.inmo.postssystem.server.EntranceKt'
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
api project(":postssystem.features.common.server")
|
|
|
|
api project(":postssystem.features.status.server")
|
|
|
|
api project(":postssystem.features.files.server")
|
|
|
|
api project(":postssystem.features.users.server")
|
|
|
|
api project(":postssystem.features.auth.server")
|
|
|
|
api project(":postssystem.features.roles.server")
|
|
|
|
api project(":postssystem.features.roles.manager.server")
|
2021-11-24 14:25:05 +00:00
|
|
|
api project(":postssystem.features.content.server")
|
2021-11-24 14:32:21 +00:00
|
|
|
api project(":postssystem.features.content.text.server")
|
2021-11-28 08:06:39 +00:00
|
|
|
api project(":postssystem.features.content.binary.server")
|
2022-01-07 15:35:11 +00:00
|
|
|
api project(":postssystem.features.publication.server")
|
|
|
|
|
2022-01-22 07:30:49 +00:00
|
|
|
api project(":postssystem.services.posts.server")
|
|
|
|
|
2022-01-07 15:35:11 +00:00
|
|
|
api project(":postssystem.targets.telegram.publication.server")
|
|
|
|
|
2022-03-02 08:36:17 +00:00
|
|
|
api libs.ktor.server.netty
|
|
|
|
api libs.ktor.websockets
|
|
|
|
api libs.exposed.jdbs
|
|
|
|
api libs.postgresql
|
2021-11-24 07:52:27 +00:00
|
|
|
}
|
2022-01-25 09:21:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|