-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle.kts
151 lines (134 loc) · 5.54 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*
* Copyright (C) 2023 Dremio
*
* 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.
*/
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
`java-library`
`maven-publish`
signing
alias(libs.plugins.nessie.run)
`build-conventions`
}
java.sourceCompatibility = JavaVersion.VERSION_1_8
applyShadowJar()
dependencies {
implementation(project(":iceberg-catalog-migrator-api"))
implementation(libs.guava)
implementation(libs.slf4j)
runtimeOnly(libs.logback.classic)
implementation(libs.picocli)
implementation(libs.iceberg.spark.runtime)
implementation(libs.hadoop.aws) { exclude("com.amazonaws", "aws-java-sdk-bundle") }
// AWS dependencies based on https://iceberg.apache.org/docs/latest/aws/#enabling-aws-integration
runtimeOnly(libs.aws.sdk.apache.client)
runtimeOnly(libs.aws.sdk.auth)
runtimeOnly(libs.aws.sdk.glue)
runtimeOnly(libs.aws.sdk.s3)
runtimeOnly(libs.aws.sdk.dynamo)
runtimeOnly(libs.aws.sdk.kms)
runtimeOnly(libs.aws.sdk.lakeformation)
runtimeOnly(libs.aws.sdk.sts)
runtimeOnly(libs.aws.sdk.url.connection.client)
// needed for Hive catalog
runtimeOnly("org.apache.hive:hive-metastore:${libs.versions.hive.get()}") {
// these are taken from iceberg repo configurations
exclude("org.apache.avro", "avro")
exclude("org.slf4j", "slf4j-log4j12")
exclude("org.pentaho") // missing dependency
exclude("org.apache.hbase")
exclude("org.apache.logging.log4j")
exclude("co.cask.tephra")
exclude("com.google.code.findbugs", "jsr305")
exclude("org.eclipse.jetty.aggregate", "jetty-all")
exclude("org.eclipse.jetty.orbit", "javax.servlet")
exclude("org.apache.parquet", "parquet-hadoop-bundle")
exclude("com.tdunning", "json")
exclude("javax.transaction", "transaction-api")
exclude("com.zaxxer", "HikariCP")
}
runtimeOnly("org.apache.hive:hive-exec:${libs.versions.hive.get()}:core") {
// these are taken from iceberg repo configurations
exclude("org.apache.avro", "avro")
exclude("org.slf4j", "slf4j-log4j12")
exclude("org.pentaho") // missing dependency
exclude("org.apache.hive", "hive-llap-tez")
exclude("org.apache.logging.log4j")
exclude("com.google.protobuf", "protobuf-java")
exclude("org.apache.calcite")
exclude("org.apache.calcite.avatica")
exclude("com.google.code.findbugs", "jsr305")
}
runtimeOnly("org.apache.hadoop:hadoop-mapreduce-client-core:${libs.versions.hadoop.get()}")
testImplementation(libs.junit.jupiter.params)
testImplementation(libs.junit.jupiter.api)
testImplementation(libs.junit.jupiter.engine)
testImplementation(libs.assertj)
testImplementation(libs.logcaptor)
testImplementation(project(":iceberg-catalog-migrator-api-test"))
// for integration tests
testImplementation(
"org.apache.iceberg:iceberg-hive-metastore:${libs.versions.iceberg.get()}:tests"
)
// this junit4 dependency is needed for above Iceberg's TestHiveMetastore
testRuntimeOnly("junit:junit:4.13.2")
testImplementation("org.apache.hive:hive-metastore:${libs.versions.hive.get()}") {
// these are taken from iceberg repo configurations
exclude("org.apache.avro", "avro")
exclude("org.slf4j", "slf4j-log4j12")
exclude("org.pentaho") // missing dependency
exclude("org.apache.hbase")
exclude("org.apache.logging.log4j")
exclude("co.cask.tephra")
exclude("com.google.code.findbugs", "jsr305")
exclude("org.eclipse.jetty.aggregate", "jetty-all")
exclude("org.eclipse.jetty.orbit", "javax.servlet")
exclude("org.apache.parquet", "parquet-hadoop-bundle")
exclude("com.tdunning", "json")
exclude("javax.transaction", "transaction-api")
exclude("com.zaxxer", "HikariCP")
}
testImplementation("org.apache.hive:hive-exec:${libs.versions.hive.get()}:core") {
// these are taken from iceberg repo configurations
exclude("org.apache.avro", "avro")
exclude("org.slf4j", "slf4j-log4j12")
exclude("org.pentaho") // missing dependency
exclude("org.apache.hive", "hive-llap-tez")
exclude("org.apache.logging.log4j")
exclude("com.google.protobuf", "protobuf-java")
exclude("org.apache.calcite")
exclude("org.apache.calcite.avatica")
exclude("com.google.code.findbugs", "jsr305")
}
testImplementation("org.apache.hadoop:hadoop-mapreduce-client-core:${libs.versions.hadoop.get()}")
nessieQuarkusServer(
"org.projectnessie.nessie:nessie-quarkus:${libs.versions.nessie.get()}:runner"
)
}
nessieQuarkusApp {
javaVersion.set(17)
includeTask(tasks.named<Test>("intTest"))
}
tasks.named<Test>("test") { systemProperty("expectedCLIVersion", project.version) }
val processResources =
tasks.named<ProcessResources>("processResources") {
inputs.property("projectVersion", project.version)
filter(
org.apache.tools.ant.filters.ReplaceTokens::class,
mapOf("tokens" to mapOf("projectVersion" to project.version))
)
}
val mainClassName = "org.projectnessie.tools.catalog.migration.cli.CatalogMigrationCLI"
val shadowJar = tasks.named<ShadowJar>("shadowJar") { isZip64 = true }
shadowJar { manifest { attributes["Main-Class"] = mainClassName } }