ext.moduleName = 'stroom.config.app'

def releaseBuildDir = "${projectDir}/../../stroom-app/build/release"
def configDefaultsFile = "${releaseBuildDir}/config/config-defaults.yml"
def configSchemaFile = "${releaseBuildDir}/config/config-schema.yml"

dependencies {
    implementation project(':stroom-activity:stroom-activity-impl-db')
    implementation project(':stroom-analytics:stroom-analytics-impl')
    implementation project(':stroom-annotation:stroom-annotation-impl')
    implementation project(':stroom-annotation:stroom-annotation-impl-db')
    implementation project(':stroom-aws:stroom-aws-s3-impl')
    implementation project(':stroom-bytebuffer')
    implementation project(':stroom-core')
    implementation project(':stroom-core-shared')
    implementation project(':stroom-cluster:stroom-cluster-api')
    implementation project(':stroom-cluster:stroom-cluster-lock-impl-db')
    implementation project(':stroom-cluster:stroom-cluster-task-impl')
    implementation project(':stroom-config:stroom-config-common')
    implementation project(':stroom-core')
    implementation project(':stroom-core-shared')
    implementation project(':stroom-dashboard:stroom-dashboard-impl')
    implementation project(':stroom-dashboard:stroom-storedquery-impl')
    implementation project(':stroom-dashboard:stroom-storedquery-impl-db')
    implementation project(':stroom-data:stroom-data-retention-api')
    implementation project(':stroom-data:stroom-data-retention-impl')
    implementation project(':stroom-data:stroom-data-store-impl-fs')
    implementation project(':stroom-docref')
    implementation project(':stroom-docstore:stroom-docstore-impl-db')
    implementation project(':stroom-event-logging:stroom-event-logging-impl')
    implementation project(':stroom-explorer:stroom-explorer-impl')
    implementation project(':stroom-explorer:stroom-explorer-impl-db')
    implementation project(':stroom-feed:stroom-feed-impl')
    implementation project(':stroom-gitrepo:stroom-gitrepo-api')
    implementation project(':stroom-gitrepo:stroom-gitrepo-impl')
    implementation project(':stroom-importexport:stroom-importexport-impl')
    implementation project(':stroom-index:stroom-index-impl')
    implementation project(':stroom-index:stroom-index-impl-db')
    implementation project(':stroom-job:stroom-job-impl')
    implementation project(':stroom-job:stroom-job-impl-db')
    implementation project(':stroom-kafka:stroom-kafka-impl')
    implementation project(':stroom-lifecycle:stroom-lifecycle-impl')
    implementation project(':stroom-lmdb')
    implementation project(':stroom-meta:stroom-meta-impl')
    implementation project(':stroom-meta:stroom-meta-impl-db')
    implementation project(':stroom-node:stroom-node-impl')
    implementation project(':stroom-node:stroom-node-impl-db')
    implementation project(':stroom-pipeline')
    implementation project(':stroom-processor:stroom-processor-impl')
    implementation project(':stroom-receive:stroom-receive-common')
    implementation project(':stroom-receive:stroom-receive-rules-impl')
    implementation project(':stroom-search:stroom-search-elastic')
    implementation project(':stroom-search:stroom-search-impl')
    implementation project(':stroom-search:stroom-search-solr')
    implementation project(':stroom-search:stroom-searchable-impl')
    implementation project(':stroom-security:stroom-security-common-impl')
    implementation project(':stroom-security:stroom-security-identity')
    implementation project(':stroom-security:stroom-security-impl')
    implementation project(':stroom-security:stroom-security-impl-db')
    implementation project(':stroom-state:stroom-state-impl')
    implementation project(':stroom-state:stroom-planb-impl')
    implementation project(':stroom-statistics:stroom-statistics-impl')
    implementation project(':stroom-statistics:stroom-statistics-impl-hbase')
    implementation project(':stroom-statistics:stroom-statistics-impl-sql')
    implementation project(':stroom-util')
    implementation project(':stroom-util-shared')

    implementation libs.commons.text
    implementation libs.dropwizard.configuration
    implementation libs.dropwizard.client
    implementation libs.dropwizard.core
    implementation libs.dropwizard.validation
    implementation libs.guice
    implementation libs.jackson.annotations
    implementation libs.jackson.core
    implementation libs.jackson.databind
    implementation libs.jackson.dataformat.yaml
    implementation libs.jakarta.inject
    implementation libs.snake.yaml

    testImplementation project(':stroom-test-common')

    testImplementation libs.jackson.datatype.jdk8
    testImplementation libs.mbknor.jackson.jsonSchema
    testImplementation libs.java.diff.utils

    testImplementation libs.bundles.common.test.implementation
    testRuntimeOnly libs.bundles.common.test.runtime
}

// Create an example yaml config file from the compile-time defaults
tasks.register('generateConfigDefaultsYamlFile', JavaExec) {
    dependsOn compileJava
    dependsOn compileTestJava

    classpath = sourceSets.test.runtimeClasspath
    mainClass = 'stroom.config.app.GenerateExpectedYaml'
    args = [configDefaultsFile, configSchemaFile]
}
