plugins {
    id 'corda.common-publishing'
    id 'corda.common-app'
}

description "P2P Testing tools - Dump topic"

ext.cordaEnableFormatting = true

dependencies {
    compileOnly "org.osgi:osgi.annotation"
    compileOnly "org.osgi:osgi.core"
    compileOnly "org.osgi:org.osgi.service.component.annotations"

    implementation platform("net.corda:corda-api:$cordaApiVersion")
    implementation 'org.jetbrains.kotlin:kotlin-osgi-bundle'
    implementation "info.picocli:picocli:$picocliVersion"
    
    implementation "org.apache.avro:avro:$avroVersion"
    constraints {
        implementation(libs.apache.commons.compress) {
            because "CVE-2023-42503, current version of Avro uses an outdated version"
        }
    }
    //needed by commons-compress
    implementation libs.apache.commons.codec

    implementation project(":libs:configuration:configuration-core")
    implementation project(":libs:configuration:configuration-merger")
    implementation project(":libs:messaging:messaging")
    implementation project(":libs:lifecycle:lifecycle")
    implementation 'net.corda:corda-config-schema'

    runtimeOnly "org.apache.felix:org.apache.felix.scr:$felixScrVersion"
    runtimeOnly "org.osgi:org.osgi.service.component:$osgiServiceComponentVersion"
    runtimeOnly "org.osgi:org.osgi.util.function:$osgiUtilFunctionVersion"
    runtimeOnly "org.osgi:org.osgi.util.promise:$osgiUtilPromiseVersion"

    runtimeOnly project(':libs:crypto:cipher-suite-impl')
    runtimeOnly project(":libs:messaging:kafka-message-bus-impl")
    runtimeOnly project(":libs:messaging:messaging-impl")
    runtimeOnly project(":libs:schema-registry:schema-registry-impl")
    runtimeOnly project(":libs:lifecycle:lifecycle-impl")
    runtimeOnly project(":libs:web:web-impl")
}

configurations.all {
    resolutionStrategy {
        // CVE-2023-42503, current version of Avro uses an outdated version
        force libs.apache.commons.compress
    }
}
