feat(02-01): wire Phase 2 dependency aliases without bumping Ktor
Task 02-01-02. Adds Phase 2 deps to the version catalog and routes
them into composeApp + server build files. Ktor stays pinned at
3.4.1 per the resolved Open Question — patch bump deferred unless a
concrete incompatibility appears.
Catalog (gradle/libs.versions.toml):
- Versions: appauth, appauth-ios, androidx-security-crypto, exposed,
hikari, multiplatformSettings, testcontainers, plus the
kotlinCocoapods plugin alias.
- Libraries: ktor server auth/auth-jwt/call-logging/status-pages,
ktor client core/auth/content-negotiation/logging/okhttp/darwin/cio,
ktor-serializationKotlinxJsonMpp (the multiplatform variant; the
-jvm one stays for server), AppAuth, AndroidX Security Crypto,
multiplatform-settings + coroutines, Exposed core/jdbc/java-time,
HikariCP, Testcontainers postgresql + junit-jupiter.
composeApp/build.gradle.kts:
- Apply kotlinSerialization (alias) and kotlin.native.cocoapods (by
id — the plugin is shipped inside the Kotlin Gradle plugin already
on the classpath via recipe.kotlin.multiplatform; alias-applying
it would request a fresh version and fail).
- Cocoapods block: ComposeApp baseName + isStatic, ../iosApp/Podfile,
iOS deployment target 15.0, AppAuth pod pulled from
libs.versions.appauth.ios.get() — no literal pin in the build
file (verify-no-version-literals.sh stays green).
- Common deps: Ktor client family, MPP serialization, multiplatform
settings; Android: AppAuth-Android + Security Crypto + OkHttp
engine; iOS: Darwin engine; JVM: CIO engine.
server/build.gradle.kts: Adds Ktor server auth/JWT/CallLogging/
StatusPages, Exposed DSL trio, Hikari, kotlinx.serialization-json,
plus testImplementation testcontainers postgresql + junit-jupiter.
Deviations:
- Rule 3 (blocking): manifestPlaceholders["appAuthRedirectScheme"]
= "recipe" added to Android defaultConfig because AppAuth-Android's
bundled manifest declares a ${appAuthRedirectScheme} placeholder
that breaks AGP merge before Plan 02-04 lands the full <intent-filter>.
- Rule 3 (blocking): top-level group/version on composeApp (required
by the cocoapods podspec generator) pushes the Compose Resources
Res-class package off recipe.composeapp.generated.resources, breaking
Phase 1 App.kt imports. Lock the package via compose.resources {
packageOfResClass = "recipe.composeapp.generated.resources" }.
- Rule 3 (housekeeping): *.podspec is generated by the cocoapods
plugin on every build; ignored.
Verification:
- ./gradlew :composeApp:dependencies --configuration debugCompileClasspath
:server:dependencies --configuration runtimeClasspath: PASS
(the plan-stated androidMainCompileClasspath name doesn't exist
under this AGP/Gradle combo; debugCompileClasspath is the
functional equivalent and resolves all new deps).
- ./gradlew :composeApp:compileDebugKotlinAndroid :server:compileKotlin: PASS
- ./gradlew :composeApp:compileKotlinIosSimulatorArm64: PASS (cinterop
pulls AppAuth pod cleanly).
- ./tools/verify-no-version-literals.sh: PASS
- ./tools/verify-shared-pure.sh: PASS
- All Task 2 grep acceptance criteria satisfied.
This commit is contained in:
@@ -29,13 +29,32 @@ dependencies {
|
||||
implementation(libs.ktor.serverNetty)
|
||||
implementation(libs.ktor.serverContentNegotiation)
|
||||
implementation(libs.ktor.serializationKotlinxJson)
|
||||
implementation(libs.kotlinx.serializationJson)
|
||||
implementation(libs.logback)
|
||||
implementation(libs.flyway.core)
|
||||
implementation(libs.flyway.database.postgresql)
|
||||
implementation(libs.postgresql)
|
||||
implementation(projects.shared)
|
||||
|
||||
// Phase 2: Ktor auth + JWT validation + observability (D-21..D-23).
|
||||
implementation(libs.ktor.serverAuth)
|
||||
implementation(libs.ktor.serverAuthJwt)
|
||||
implementation(libs.ktor.serverCallLogging)
|
||||
implementation(libs.ktor.serverStatusPages)
|
||||
|
||||
// Phase 2: Exposed DSL + Hikari connection pool (D-26).
|
||||
implementation(libs.exposed.core)
|
||||
implementation(libs.exposed.jdbc)
|
||||
implementation(libs.exposed.java.time)
|
||||
implementation(libs.hikari)
|
||||
|
||||
testImplementation(libs.ktor.serverTestHost)
|
||||
testImplementation(libs.kotlin.testJunit)
|
||||
|
||||
// Phase 2: Testcontainers for JIT user provisioning + JWT auth integration tests
|
||||
// (AUTH-03, AUTH-06). Wired here so Plan 02-02 only needs to write tests.
|
||||
testImplementation(libs.testcontainers.postgresql)
|
||||
testImplementation(libs.testcontainers.junit.jupiter)
|
||||
}
|
||||
|
||||
flyway {
|
||||
|
||||
Reference in New Issue
Block a user