Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Server module #299

Merged
merged 12 commits into from
Aug 9, 2023
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ ktor-client-serialization = { module = "io.ktor:ktor-serialization-kotlinx-json"
ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }
ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktor" }
ktor-client-winhttp = { module = "io.ktor:ktor-client-winhttp", version.ref = "ktor" }
ktor-server-core = { module = "io.ktor:ktor-server-core", version.ref = "ktor" }
ktor-server-netty = { module = "io.ktor:ktor-server-netty", version.ref = "ktor" }
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }
okio-fakefilesystem = { module = "com.squareup.okio:okio-fakefilesystem", version.ref = "okio" }
okio-nodefilesystem = { module = "com.squareup.okio:okio-nodefilesystem", version.ref = "okio" }
Expand Down
34 changes: 34 additions & 0 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
plugins {
id(libs.plugins.kotlin.jvm.get().pluginId)
id(libs.plugins.kotlinx.serialization.get().pluginId)
}

repositories {
mavenCentral()
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}

dependencies {
implementation(projects.xefCore)
implementation(projects.xefKotlin)
implementation(libs.kotlinx.serialization.json)
implementation(libs.logback)
implementation(libs.klogging)
implementation(libs.ktor.server.netty)
implementation(libs.ktor.server.core)
}

tasks.getByName<Copy>("processResources") {
dependsOn(projects.xefGpt4all.dependencyProject.tasks.getByName("jvmProcessResources"))
from("${projects.xefGpt4all.dependencyProject.buildDir}/processedResources/jvm/main")
into("$buildDir/resources/main")
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.xebia.functional.xef.server

object Main {
@JvmStatic
fun main(args: Array<String>) {
println("Hello, world!")
}
}
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@ project(":xef-reasoning").projectDir = file("reasoning")
include("xef-java-examples")
project(":xef-java-examples").projectDir = file("examples/java")
//</editor-fold>

//<editor-fold desc="Kotlin">
include("xef-server")
project(":xef-server").projectDir = file("server")