apply plugin: 'kotlin'
apply plugin: 'net.corda.plugins.publish-utils'
apply plugin: 'com.jfrog.artifactory'

description 'Network bootstrapper'

dependencies {
    compile project(':node-api')
    compile project(':tools:cliutils')
    compile project(":common-logging")
    compile project(':common-configuration-parsing')
    compile "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version"

    testCompile(project(':test-utils')) {
        exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
    }

    testCompile(project(':test-cli'))
    testCompile "com.nhaarman:mockito-kotlin:$mockito_kotlin_version"
    testCompile "org.mockito:mockito-core:$mockito_version"
}

processResources {
    from file("$rootDir/config/dev/log4j2.xml")
}

jar {
    from(configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }) {
        exclude "META-INF/*.SF"
        exclude "META-INF/*.DSA"
        exclude "META-INF/*.RSA"
    }
    from(project(':node:capsule').tasks['buildCordaJAR']) {
        rename 'corda-(.*)', 'corda.jar'
    }
    baseName = "network-bootstrapper"
    manifest {
        attributes(
                'Main-Class': 'net.corda.bootstrapper.MainKt'
        )
    }
}

publish {
    name 'corda-tools-network-bootstrapper'
}
