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 AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The project is structured into distinct, decoupled framework modules. **Do not v
- **`ktor`**: Ktor (server and client) integrations, route annotation binding (`@RestController`, `@GetMapping`, `@PostMapping`, `@PatchMapping`), request parameter resolvers (`@QueryParam`, `@PathParam`, `@RequestBody`), automatic `@Valid` validation integration, `ResponseEntity` wrapper, `MessageDto` error response standardization, OpenAPI metadata (`@Operation`, `@ApiResponses`, `@ApiResponse`), a preconfigured HTTP client (`createHttpClient`), and the built-in `/health` UP endpoint auto-registered by `configureDefaultModules`.
- **`koin`**: Dependency carrier publishing the Koin runtime APIs (`koin-bom`, `koin-core`, `koin-annotations`) via `api(...)`; contains no source code.
- **`koin-exposed`**: Koin bridge for transactions — `applyTransactionalProxies()` post-processor replacing eligible singleton definitions with `TransactionalProxy`-wrapping factories; depends on `exposed` and the `koin` carrier.
- **`ktor-test`**: Dependency carrier publishing the Ktor server test host (`ktor-server-test-host`) via `api(...)`; contains no source code.
- **`ktor-test`**: Dependency carrier publishing the Ktor server test host (`ktor-server-test-host`) and the Ktor client mock engine (`ktor-client-mock`) via `api(...)`; contains no source code.
- **`plugin`**: Gradle convention plugins for downstream projects (e.g. `fr.shikkanime.framework.ktor`, `fr.shikkanime.framework.koin`).

For detailed architectural principles, read the [Architecture Guide](guidelines/ARCHITECTURE.md).
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ ktorServerTestHost = { module = "io.ktor:ktor-server-test-host", version.ref = "
ktorClientCore = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktorClientOkHttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
ktorClientContentNegociation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
ktorClientMock = { module = "io.ktor:ktor-client-mock", version.ref = "ktor" }
kotlinxSerializationCore = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinxSerialization" }
kotlinxSerializationJson = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerialization" }
kotlinxSerializationProtobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "kotlinxSerialization" }
Expand Down
8 changes: 5 additions & 3 deletions ktor-test/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ The `ktor-test` module is a **dependency carrier**: it publishes Ktor's server t
- Never add application code, helpers, or wrappers here.

2. **Dependency exposure**:
- The Ktor version is centralized in `gradle/libs.versions.toml` (`ktorServerTestHost`).
- Ktor versions are centralized in `gradle/libs.versions.toml` (`ktorServerTestHost`,
`ktorClientMock`).
- Dependencies are exposed with `api(...)` (Dependency Sharing rule), never `implementation`.

3. **Consumption**:
- Unlike the Koin compiler plugin, there is **no Gradle plugin** for this module. Consumers
declare it explicitly in their test scope:
`testImplementation("fr.shikkanime.framework:ktor-test:<frameworkVersion>")`.
- `testImplementation`-only consumption keeps the test host **off the consumer's production
classpath** while centralizing the version in the framework catalog.
- `testImplementation`-only consumption keeps the test host and the mock client engine
**off the consumer's production classpath** while centralizing the versions in the
framework catalog.
3 changes: 2 additions & 1 deletion ktor-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ plugins {

dependencies {
api(libs.ktorServerTestHost)
}
api(libs.ktorClientMock)
}
Loading