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
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ include("velocity-testkit") // in-memory velocity-spi impl, conformance TCK sce

// Phase 2 — v1 reference backends (tumbling + sliding), the service tier, and the generated client.
include("velocity-backend-jdbi") // Postgres/JDBI backend — v1 tumbling reference
// include("velocity-backend-redis") // Redis/Lettuce backend — v1 sliding / hot-path reference
include("velocity-backend-redis") // Redis/Lettuce backend — v1 sliding / hot-path reference
// include("velocity-dropwizard") // Dropwizard bundle, Jersey resources, Dagger wiring, API-key auth
// include("velocity-client-java") // Java client generated from OpenAPI via openapi-generator
// include("examples:dropwizard-demo")// runnable reference service (not published)
Expand Down
46 changes: 46 additions & 0 deletions velocity-backend-redis/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
plugins {
id("velocity.library-conventions")
id("velocity.test-conventions")
id("velocity.publish-conventions")
}

description =
"velocity-backend-redis: the v1 Redis/Lettuce sliding hot-path reference backend — an exact," +
" atomic, read-your-write VelocityBackend (COUNT/SUM/DISTINCT over true sliding windows via" +
" sorted sets + Lua) that passes the velocity-testkit conformance TCK against real Redis."

// Lettuce ships as an automatic module and pulls Reactor/Netty (also automatic modules); the
// baseline -Xlint:all makes their `requires` a warning, which -Werror (library-conventions) turns
// fatal. Silence just the automatic-module lints on both the main and test compiles (mirrors the
// jdbi module).
tasks.named<JavaCompile>("compileJava") {
options.compilerArgs.addAll(
listOf("-Xlint:-requires-automatic", "-Xlint:-requires-transitive-automatic"),
)
}
tasks.named<JavaCompile>("compileTestJava") {
options.compilerArgs.addAll(
listOf("-Xlint:-requires-automatic", "-Xlint:-requires-transitive-automatic"),
)
}

dependencies {
// The frozen contract this backend implements is on the api surface.
api(project(":velocity-spi"))
api(libs.jspecify)

implementation(libs.lettuce.core)
implementation(libs.slf4j.api)

// Reactor's class files reference com.google.errorprone.annotations.*; without errorprone
// annotations on the compile classpath javac emits an annotation-not-found warning that -Werror
// turns fatal. compileOnly so it is not broadcast as a runtime dependency.
compileOnly(libs.build.errorprone.annotations)
testCompileOnly(libs.build.errorprone.annotations)

// The testkit drives the conformance TCK (*Scenarios) + MutableClock against this backend.
testImplementation(project(":velocity-testkit"))
testImplementation(libs.testcontainers.core)
testImplementation(libs.testcontainers.junit.jupiter)
testRuntimeOnly(libs.logback.classic)
}
Loading
Loading