Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ This example uses `Spring` to serve the front end. ([code](spring/server.kt))
cd ./spring ; jbang server.kt ; cd ..
```

### Quarkus

These examples use `Quarkus` to serve the front end.

- [Quarkus Qute](quarkus/quarkus-qute-example/src/main/kotlin/dev/datastar/kotlin/QuteCounterApp.kt): Demonstrates simple integration with Qute templates.
- [Quarkus Rest](quarkus/quarkus-rest-example/src/main/kotlin/dev/datastar/kotlin/CounterApp.kt) : Demonstrates reactive integration with Quarkus only.

### Ktor

This example uses `Ktor` to serve the front end. ([code](ktor/server.kt))
Expand Down
52 changes: 52 additions & 0 deletions examples/quarkus/quarkus-qute-example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
plugins {
kotlin("jvm") version "2.2.10"
kotlin("plugin.allopen") version "2.2.10"
id("io.quarkus")
}

repositories {
mavenCentral()
mavenLocal()
}

val quarkusPlatformGroupId: String by project
val quarkusPlatformArtifactId: String by project
val quarkusPlatformVersion: String by project

dependencies {
implementation("dev.data-star.kotlin:kotlin-sdk:1.0.0-RC1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")

implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
implementation("io.quarkus:quarkus-rest")
implementation("io.quarkus:quarkus-kotlin")
implementation("io.quarkiverse.qute.web:quarkus-qute-web")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("io.quarkus:quarkus-arc")
testImplementation("io.quarkus:quarkus-junit5")
}

group = "dev.datastar"
version = "1.0.0-SNAPSHOT"

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

tasks.withType<Test> {
systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
}
allOpen {
annotation("jakarta.ws.rs.Path")
annotation("jakarta.enterprise.context.ApplicationScoped")
annotation("jakarta.persistence.Entity")
annotation("io.quarkus.test.junit.QuarkusTest")
}

kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21
javaParameters = true
}
}
7 changes: 7 additions & 0 deletions examples/quarkus/quarkus-qute-example/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Gradle properties

quarkusPluginId=io.quarkus
quarkusPluginVersion=3.26.1
quarkusPlatformGroupId=io.quarkus.platform
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformVersion=3.26.1
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
251 changes: 251 additions & 0 deletions examples/quarkus/quarkus-qute-example/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading