/*
 * Copyright 2018 LinkedIn Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

apply plugin: 'distribution'

dependencies {
    compile(project(':az-core'))
    compile(project(':azkaban-common'))

    compile deps.guava
    compile deps.jsr305
    compile deps.kafkaLog4jAppender
    runtime(project(':azkaban-hadoop-security-plugin'))

    testCompile(project(path: ':azkaban-common', configuration: 'testCompile'))
    testCompile(project(':azkaban-common').sourceSets.test.output)

    testCompile deps.h2
    testCompile deps.hadoopAnnotations
    testCompile deps.hadoopAuth
    testCompile deps.hadoopCommon
    testCompile deps.hadoopHdfs
}

distributions {
    main {
        contents {
            from('src/main/bash') {
                into 'bin'
                fileMode = 0755
            }
            from('src/main/resources/conf') {
                into 'conf'
                fileMode = 0755
            }
            from('src/main/resources/commonprivate.properties') {
                into 'plugins/jobtypes'
            }
            from('../azkaban-common/src/main/bash') {
                into 'bin'
                fileMode = 0755
            }
            from(configurations.runtime) {
                into 'lib'
            }
            from(jar) {
                into 'lib'
            }
        }
    }
}
