working on web interface
This commit is contained in:
+43
-18
@@ -4,9 +4,19 @@ plugins {
|
||||
application
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
/*
|
||||
* Files supplied by the web project.
|
||||
*
|
||||
* This configuration is resolvable by this project but isn't itself
|
||||
* published for other projects to consume.
|
||||
*/
|
||||
val webFiles = configurations.create("webFiles")
|
||||
/*
|
||||
{
|
||||
isCanBeResolved = true
|
||||
isCanBeConsumed = false
|
||||
}
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
// Ktor
|
||||
@@ -22,7 +32,12 @@ dependencies {
|
||||
// Logging
|
||||
implementation(libs.ktor.server.logging)
|
||||
implementation(libs.logback)
|
||||
|
||||
// Swagger/OpenAPI
|
||||
implementation(libs.ktor.server.swagger)
|
||||
implementation(libs.ktor.server.openapi)
|
||||
implementation(libs.ktor.server.routing.openapi)
|
||||
implementation(libs.ktor.server.content.negotiation)
|
||||
|
||||
// Testing
|
||||
testImplementation(libs.ktor.server.test.host)
|
||||
@@ -31,29 +46,39 @@ dependencies {
|
||||
// Websockets
|
||||
implementation(libs.ktor.server.websockets)
|
||||
|
||||
// Swagger/OpenAPI
|
||||
implementation(libs.ktor.server.openapi)
|
||||
implementation(libs.ktor.server.routing.openapi)
|
||||
implementation(libs.ktor.server.content.negotiation)
|
||||
|
||||
// General Use
|
||||
implementation(libs.kotlinx.datetime)
|
||||
|
||||
// Shared application code
|
||||
implementation(project(":shared"))
|
||||
implementation("ch.qos.logback:logback-classic:1.6.3")
|
||||
|
||||
/*
|
||||
* Web application's generated files.
|
||||
*
|
||||
* This is a build-time dependency, not a runtime dependency.
|
||||
* The web project exposes the files through its webDistribution
|
||||
* outgoing configuration.
|
||||
*/
|
||||
webFiles(project(path = ":web", configuration = "webDistribution"))
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass = "dev.geekback.dopewars.server.ServerKt"
|
||||
}
|
||||
//
|
||||
//// Copy the JS+HTML from web to here
|
||||
//tasks.processResources {
|
||||
// dependsOn(":web:wasmJsBrowserProductionWebpack")
|
||||
//
|
||||
// from(project(":web")
|
||||
// .layout
|
||||
// .buildDirectory
|
||||
// .dir("dist/js/productionExecutable"))
|
||||
//}
|
||||
|
||||
/*
|
||||
* Copy the web distribution into the server's resources.
|
||||
*
|
||||
* The files will end up at:
|
||||
*
|
||||
* server/build/resources/main/web/
|
||||
*
|
||||
* and therefore inside the server JAR at:
|
||||
*
|
||||
* web/
|
||||
*/
|
||||
tasks.processResources {
|
||||
from(webFiles) {
|
||||
into("web")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user