configurations {
  all {
    transitive = false
  }
  errorprone {
    transitive = true
  }
}

dependencies {
  compile(project(':azkaban-common'))
  compile('commons-io:commons-io:2.4')
  compile('javax.servlet:servlet-api:2.5')
  compile('joda-time:joda-time:2.0')
  compile('log4j:log4j:1.2.16')
  compile('commons-logging:commons-logging:1.1.1')
  compile('org.apache.httpcomponents:httpclient:4.3.1')
  compile('org.apache.httpcomponents:httpcore:4.3')
  compile('org.mortbay.jetty:jetty:6.1.26')
  compile('org.mortbay.jetty:jetty-util:6.1.26')
  compile('org.codehaus.jackson:jackson-core-asl:1.9.5')
  compile('org.codehaus.jackson:jackson-mapper-asl:1.9.5')

  testCompile('junit:junit:4.11')
  testCompile('org.hamcrest:hamcrest-all:1.3')
  testCompile(project(':azkaban-common').sourceSets.test.output)
}

task createDirs() << {
  file('build/package/extlib').mkdirs()
  file('build/package/plugins').mkdirs()
}

task copyDeps(type: Copy, dependsOn: 'build') {
  from(project(':azkaban-common').configurations.compile)
  from(configurations.compile)
  into('build/package/lib')
}

task copyLibs(type: Copy, dependsOn: 'build') {
  from('build/libs')
  into('build/package/lib')
}

task copyPackage(type: Copy) {
  from('src/package')
  into('build/package')
}

task copy(dependsOn: [
        'createVersionFile',
        'createDirs',
        'copyDeps',
        'copyLibs',
        'copyPackage']) {
}
