blob: bdbd0ac2564f35e3f2afe14484452b062dd595df [file] [log] [blame]
// Copyright (C) 2014-2016 LinkedIn Corp. All rights reserved.
//
// 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.
apply plugin: 'java'
apply plugin: 'eclipse'
dependencies {
compile project(":gobblin-api")
compile project(":gobblin-utility")
compile project(":gobblin-metrics")
compile project(":gobblin-core")
compile externalDependency.calciteCore
compile externalDependency.calciteAvatica
compile externalDependency.jhyde
compile externalDependency.avro
compile externalDependency.commonsLang
compile externalDependency.commonsMath
compile externalDependency.hiveExec
if (project.hasProperty('useHadoop2')) {
runtime externalDependency.hadoopCommon
runtime externalDependency.hadoopClientCore
runtime externalDependency.hadoopHdfs
runtime externalDependency.hadoopAuth
} else {
runtime externalDependency.hadoop
}
runtime(externalDependency.hiveService) {
exclude group: 'org.apache.hive', module: 'hive-exec'
}
runtime externalDependency.hiveJdbc
runtime externalDependency.hiveMetastore
runtime externalDependency.antlrRuntime
runtime externalDependency.derby
runtime externalDependency.jdo2
runtime externalDependency.datanucleusCore
runtime externalDependency.datanucleusRdbms
testCompile externalDependency.testng
}
configurations {
compile { transitive = true }
archives
}
ext.classification="library"
jar {
def manifestClasspath = configurations.runtime.collect { "gobblin-compaction_lib/" + it.getName() }.join(' ')
manifestClasspath = ". " + manifestClasspath
manifest {
attributes("Manifest-Version" : "1.0",
"Main-Class" : "gobblin.compaction.hive.CompactionRunner",
"Class-Path" : manifestClasspath
)
}
}
task createCompactionTar(type: Tar) {
//there seems to be a bug in the Gradle signing module where X.tar.gz will generate
// a signature X.gz.asc instead of X.tar.gz.asc. Therefore, we have to use the .tgz
// extension
extension = 'tgz'
baseName = project.name
compression = Compression.GZIP
into("gobblin-compaction_lib") { from configurations.runtime }
into(".") { from "${project.rootDir}/build/${project.name}/libs/${project.name}-${project.version}.jar" }
into(".") { from project.rootDir.path + "/conf/log4j-compaction.xml" rename ('log4j-compaction.xml', 'log4j.xml')}
}
createCompactionTar.dependsOn ':gobblin-compaction:jar'
artifacts {
archives createCompactionTar
}