bootJar {
    archiveFileName = 'ai-service.jar'
}

dependencies {
    // Kafka Consumer
    implementation 'org.springframework.kafka:spring-kafka'

    // Redis for result caching (already in root build.gradle)
    // implementation 'org.springframework.boot:spring-boot-starter-data-redis'

    // OpenFeign for Claude/GPT API
    implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'

    // Resilience4j for Circuit Breaker
    implementation "io.github.resilience4j:resilience4j-spring-boot3:${resilience4jVersion}"
    implementation "io.github.resilience4j:resilience4j-circuitbreaker:${resilience4jVersion}"

    // Jackson for JSON
    implementation 'com.fasterxml.jackson.core:jackson-databind'

    // JWT (for security)
    implementation "io.jsonwebtoken:jjwt-api:${jjwtVersion}"
    runtimeOnly "io.jsonwebtoken:jjwt-impl:${jjwtVersion}"
    runtimeOnly "io.jsonwebtoken:jjwt-jackson:${jjwtVersion}"

    // Note: PostgreSQL dependency is in root build.gradle but AI Service doesn't use DB
    // We still include it for consistency, but no JPA entities will be created
}

// Kafka Manual Test 실행 태스크
task runKafkaManualTest(type: JavaExec) {
    group = 'verification'
    description = 'Run Kafka manual test'
    classpath = sourceSets.test.runtimeClasspath
    mainClass = 'com.kt.ai.test.manual.KafkaManualTest'
}
