plugins {
    id "code-quality-conventions"
    id "java-conventions"
    id "sbom-conventions"
    id "release-conventions"
}

dependencies {
    api project(":arconia-spring-boot")
    api project(":arconia-observability:arconia-opentelemetry-logback-bridge")
    api project(":arconia-observability:arconia-opentelemetry-micrometer-metrics-bridge")
    api project(":arconia-observability:arconia-opentelemetry")

    api "io.opentelemetry.instrumentation:opentelemetry-instrumentation-api"
    api "org.springframework.boot:spring-boot-starter-actuator"

    runtimeOnly("io.opentelemetry:opentelemetry-exporter-otlp") {
        exclude group: "io.opentelemetry", module: "opentelemetry-exporter-sender-okhttp"
    }
    runtimeOnly "io.opentelemetry:opentelemetry-exporter-sender-jdk"

    runtimeOnly "io.micrometer:micrometer-java21"
    runtimeOnly("io.micrometer:micrometer-tracing-bridge-otel") {
        exclude group: "io.opentelemetry.instrumentation", module: "opentelemetry-instrumentation-api-incubator"
    }

    implementation "org.springframework.boot:spring-boot-starter"

    testImplementation "org.springframework.boot:spring-boot-starter-test"
}

dependencyManagement {
    imports {
        mavenBom "io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:${openTelemetryInstrumentationVersion}-alpha"
    }
}

publishing {
    publications {
        mavenJava(MavenPublication) {
            pom {
                name = "Arconia OpenTelemetry Spring Boot Starter"
                description = "Arconia OpenTelemetry Spring Boot Starter."
            }
        }
    }
}
