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

val springBootStarterVersion = "3.1.5"

dependencies {
    api(project(":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("com.knecon.fforesight:mongo-database-commons:0.18.0") {
        exclude(group = "com.knecon.fforesight", module = "tenant-commons")
        exclude(group = "org.liquibase.ext", module = "liquibase-mongodb")
    }
    api("com.knecon.fforesight:tenant-commons:0.31.0-RED10196.0")
    api("org.springframework.boot:spring-boot-starter-data-mongodb:${springBootStarterVersion}")
    api("org.springframework.boot:spring-boot-starter-validation:3.1.3")
    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")

    implementation("org.mapstruct:mapstruct:1.5.5.Final")
    annotationProcessor("org.mapstruct:mapstruct-processor:1.5.5.Final")
}

description = "persistence-service-shared-mongo-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();
            }
        }
    }
}

