|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one or more |
| 3 | + * contributor license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright ownership. |
| 5 | + * The ASF licenses this file to You under the Apache License, Version 2.0 |
| 6 | + * (the "License"); you may not use this file except in compliance with |
| 7 | + * the License. You may obtain a copy of the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * See the License for the specific language governing permissions and |
| 15 | + * limitations under the License. |
| 16 | + */ |
| 17 | + |
| 18 | +plugins { |
| 19 | + // Bump up shadow version to support Gradle 5.x https://github.com/johnrengelman/shadow |
| 20 | + id 'com.github.johnrengelman.shadow' version '5.2.0' |
| 21 | +} |
| 22 | + |
| 23 | +apply plugin: 'java' |
| 24 | + |
| 25 | +dependencies { |
| 26 | + implementation project(path: ':gobblin-yarn') |
| 27 | + compile project(":gobblin-api") |
| 28 | + compile project(":gobblin-cluster") |
| 29 | + compile project(":gobblin-core") |
| 30 | + compile project(":gobblin-metrics-libs:gobblin-metrics") |
| 31 | + compile project(":gobblin-metastore") |
| 32 | + compile project(":gobblin-runtime") |
| 33 | + compile project(":gobblin-utility") |
| 34 | + compile project(":gobblin-yarn") |
| 35 | + compile project(path: ':gobblin-rest-service:gobblin-rest-api', configuration: 'restClient') |
| 36 | + compile project(":gobblin-rest-service:gobblin-rest-server") |
| 37 | + |
| 38 | + compile externalDependency.avro |
| 39 | + compile externalDependency.commonsConfiguration |
| 40 | + compile externalDependency.quartz |
| 41 | + compile externalDependency.guava |
| 42 | + compile externalDependency.commonsLang |
| 43 | + compile externalDependency.slf4j |
| 44 | + |
| 45 | + compile externalDependency.commonsCli |
| 46 | + compile externalDependency.gson |
| 47 | + compile externalDependency.hiveCommon |
| 48 | + compile externalDependency.metricsCore |
| 49 | + compile externalDependency.metricsJvm |
| 50 | + compile externalDependency.commonsIo |
| 51 | + compile externalDependency.commonsEmail |
| 52 | + compile externalDependency.pegasus.data |
| 53 | + compile externalDependency.typesafeConfig |
| 54 | + compile externalDependency.hadoopClientCommon |
| 55 | + compile externalDependency.hadoopCommon |
| 56 | + compile externalDependency.hadoopYarnApi |
| 57 | + compile externalDependency.hadoopYarnCommon |
| 58 | + compile externalDependency.hadoopYarnClient |
| 59 | + compile externalDependency.avroMapredH2 |
| 60 | + compile externalDependency.findBugsAnnotations |
| 61 | + compile (externalDependency.helix) { |
| 62 | + exclude group: 'io.dropwizard.metrics', module: 'metrics-core' |
| 63 | + } |
| 64 | + compile externalDependency."temporal-sdk" |
| 65 | + testCompile project(path: ':gobblin-cluster', configuration: 'tests') |
| 66 | + testCompile project(":gobblin-example") |
| 67 | + |
| 68 | + testCompile externalDependency.testng |
| 69 | + testCompile externalDependency.mockito |
| 70 | + testCompile externalDependency.hadoopYarnMiniCluster |
| 71 | + testCompile externalDependency.curatorFramework |
| 72 | + testCompile externalDependency.curatorTest |
| 73 | + |
| 74 | + testCompile ('com.google.inject:guice:3.0') { |
| 75 | + force = true |
| 76 | + } |
| 77 | +} |
| 78 | + |
| 79 | +task testJar(type: Jar, dependsOn: testClasses) { |
| 80 | + baseName = "test-${project.archivesBaseName}" |
| 81 | + from sourceSets.test.output |
| 82 | +} |
| 83 | + |
| 84 | +// This line is added as a work around to fix a bug. Without this line, the build |
| 85 | +// might fail intermittently with a 'Could not find property mavenDeployer' error. |
| 86 | +// More details: check TOOLS-123257 |
| 87 | +tasks.remove(tasks.uploadShadow) |
| 88 | + |
| 89 | +// create a single Jar with all dependencies |
| 90 | +shadowJar { |
| 91 | + zip64 true |
| 92 | + dependencies { |
| 93 | + exclude dependency('org.eclipse.jetty:.*') |
| 94 | + exclude dependency('org.mortbay.jetty:.*') |
| 95 | + exclude dependency('org.projectlombok:.*') |
| 96 | + exclude dependency('org.codehaus.groovy:.*') |
| 97 | + exclude dependency('org.apache.kafka:.*') |
| 98 | + exclude dependency('mysql:.*') |
| 99 | + exclude dependency('com.linkedin.pegasus:.*') |
| 100 | + exclude dependency('org.bouncycastle:.*') |
| 101 | + exclude dependency('org.testng:.*') |
| 102 | + exclude dependency('org.mockito:.*') |
| 103 | + exclude dependency('org.datanucleus:.*') |
| 104 | + exclude dependency('org.apache.hive:.*') |
| 105 | + exclude dependency('com.linkedin.hive:.*') |
| 106 | + exclude dependency('org.scala-lang:scala-library:.*') |
| 107 | + exclude dependency('org.apache.derby:.*') |
| 108 | + } |
| 109 | + mergeServiceFiles() |
| 110 | +} |
| 111 | + |
| 112 | +configurations { |
| 113 | + tests |
| 114 | +} |
| 115 | + |
| 116 | +configurations { |
| 117 | + compile { |
| 118 | + transitive = false |
| 119 | + } |
| 120 | + |
| 121 | + testRuntime { |
| 122 | + resolutionStrategy { |
| 123 | + force 'com.google.inject:guice:3.0' |
| 124 | + force 'org.apache.hadoop:hadoop-yarn-server-resourcemanager:'+hadoopVersion |
| 125 | + } |
| 126 | + } |
| 127 | +} |
| 128 | + |
| 129 | +artifacts { |
| 130 | + tests testJar |
| 131 | +} |
| 132 | + |
| 133 | +test { |
| 134 | + dependsOn shadowJar |
| 135 | + workingDir rootProject.rootDir |
| 136 | + maxParallelForks = 1 |
| 137 | + forkEvery = 1 |
| 138 | +} |
| 139 | + |
| 140 | +clean { |
| 141 | + delete "../gobblin-test/locks" |
| 142 | + delete "../gobblin-test/basicTest" |
| 143 | +} |
| 144 | + |
| 145 | +ext.classification="library" |
0 commit comments