plugins {
    id("com.iqser.red.service.java-conventions")
    id("io.freefair.lombok") version "8.6"
}

val springBootStarterVersion = "3.1.5"

dependencies {

    api("com.knecon.fforesight:layoutparser-service-internal-api:0.188.0") {
        exclude(group = "com.iqser.red.service", module = "persistence-service-internal-api-v1")
        exclude(group = "com.iqser.red.service", module = "persistence-service-shared-api-v1")
    }
    api("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.17.2")
    api("com.google.guava:guava:31.1-jre")
    api("org.springframework.boot:spring-boot-starter-validation:3.1.3")
    api("com.iqser.red.commons:jackson-commons:2.3.0")
    api("com.iqser.red.commons:dictionary-merge-commons:1.3.0")
    testImplementation("com.iqser.red.commons:test-commons:2.1.0")
    testImplementation("org.springframework.boot:spring-boot-starter-test:3.0.4")
    compileOnly("org.springdoc:springdoc-openapi-ui:1.7.0")
    compileOnly("io.github.openfeign:feign-core:12.2")
    compileOnly("org.springframework:spring-web:6.0.6")
    implementation("org.mapstruct:mapstruct:1.5.5.Final")
    annotationProcessor("org.mapstruct:mapstruct-processor:1.5.5.Final")
    implementation("com.joestelmach:natty:0.13")
}

description = "persistence-service-shared-api-v1"

publishing {
    publications {
        create<MavenPublication>(name) {
            from(components["java"])
        }
    }
    repositories {
        maven {
            url = uri("https://nexus.knecon.com/repository/red-platform-releases/")
            credentials {
                username = providers.gradleProperty("mavenUser").getOrNull();
                password = providers.gradleProperty("mavenPassword").getOrNull();
            }
        }
    }
}

