Skip to content

Commit

Permalink
WIP Migrate to Gradle version catalogs / project changes
Browse files Browse the repository at this point in the history
Replaces all "platform"s with a single version catalog.
  • Loading branch information
snazy committed Sep 21, 2022
1 parent 8d7c5f7 commit 9bb61ef
Show file tree
Hide file tree
Showing 52 changed files with 465 additions and 558 deletions.
8 changes: 3 additions & 5 deletions clients/antlr-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@ plugins {
`java-library`
`maven-publish`
signing
id("com.github.johnrengelman.shadow")
`nessie-conventions`
}

applyShadowJar()

extra["maven.name"] = "Nessie - Antlr Runtime"

dependencies {
implementation(nessieProjectPlatform("nessie-deps-antlr", gradle))
implementation("org.antlr:antlr4-runtime")
}
dependencies { implementation(libs.antlr.antlr4.runtime) }

tasks.named<ShadowJar>("shadowJar") {
dependencies { include(dependency("org.antlr:antlr4-runtime")) }
Expand Down
41 changes: 19 additions & 22 deletions clients/client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ plugins {
extra["maven.name"] = "Nessie - Client"

dependencies {
compileOnly(platform(project(":nessie-deps-build-only")))
annotationProcessor(platform(project(":nessie-deps-build-only")))
implementation(platform(rootProject))

api(project(":nessie-model"))
Expand All @@ -49,38 +47,37 @@ dependencies {
version { strictly(jacksonVersion) }
}
} else {
implementation(platform("com.fasterxml.jackson:jackson-bom"))
implementation(platform(libs.jackson.bom))
implementation("com.fasterxml.jackson.core:jackson-core")
implementation("com.fasterxml.jackson.core:jackson-annotations")
implementation("com.fasterxml.jackson.core:jackson-databind")
}
implementation("org.eclipse.microprofile.openapi:microprofile-openapi-api")
compileOnly("jakarta.validation:jakarta.validation-api")
implementation("javax.ws.rs:javax.ws.rs-api")
implementation("com.google.code.findbugs:jsr305")
compileOnly("com.google.errorprone:error_prone_annotations")
implementation(libs.microprofile.openapi)
compileOnly(libs.jakarta.validation.api)
implementation(libs.javax.ws.rs)
implementation(libs.findbugs.jsr305)
compileOnly(libs.errorprone.annotations)

compileOnly("org.immutables:builder")
compileOnly("org.immutables:value-annotations")
annotationProcessor("org.immutables:value-processor")
compileOnly(libs.immutables.builder)
compileOnly(libs.immutables.value.annotations)
annotationProcessor(libs.immutables.value.processor)

testImplementation(platform(project(":nessie-deps-testing")))
testImplementation(platform("org.junit:junit-bom"))
testImplementation(platform(libs.junit.bom))

testImplementation("com.google.guava:guava")
testImplementation("org.bouncycastle:bcprov-jdk15on")
testImplementation("org.bouncycastle:bcpkix-jdk15on")
testImplementation("org.mockito:mockito-core")
testImplementation(libs.guava)
testImplementation(libs.bouncycastle.bcprov)
testImplementation(libs.bouncycastle.bcpkix)
testImplementation(libs.mockito.core)

testImplementation("org.assertj:assertj-core")
testImplementation(libs.assertj.core)
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")

compileOnly("io.quarkus:quarkus-smallrye-opentracing")
compileOnly("software.amazon.awssdk:auth")
testImplementation("io.quarkus:quarkus-smallrye-opentracing")
testImplementation("software.amazon.awssdk:auth")
compileOnly(libs.quarkus.smallrye.opentracing)
compileOnly(libs.awssdk.auth)
testImplementation(libs.quarkus.smallrye.opentracing)
testImplementation(libs.awssdk.auth)
}

jandex { skipDefaultProcessing() }
23 changes: 12 additions & 11 deletions clients/deltalake/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ plugins {
`maven-publish`
signing
scala
id("com.github.johnrengelman.shadow")
id("org.projectnessie")
alias(libs.plugins.nessie.run)
`nessie-conventions`
}

applyShadowJar()

val sparkScala = useSparkScalaVersionsForProject("3.2")

dependencies {
// picks the right dependencies for scala compilation
forScala(sparkScala.scalaVersion)

implementation(platform(nessieRootProject()))
implementation(nessieProjectPlatform("nessie-deps-iceberg", gradle))

implementation(nessieProject("nessie-model"))
implementation(nessieProject("nessie-client"))
Expand All @@ -43,11 +43,11 @@ dependencies {
implementation("org.apache.spark:spark-sql_${sparkScala.scalaMajorVersion}") {
forSpark(sparkScala.sparkVersion)
}
implementation("io.delta:delta-core_${sparkScala.scalaMajorVersion}")
compileOnly("org.eclipse.microprofile.openapi:microprofile-openapi-api")
implementation(libs.delta.core)
compileOnly(libs.microprofile.openapi)
compileOnly(libs.errorprone.annotations)

testImplementation(nessieProjectPlatform("nessie-deps-testing", gradle))
testImplementation(platform("org.junit:junit-bom"))
testImplementation(platform(libs.junit.bom))

testImplementation(
nessieProject(
Expand All @@ -58,11 +58,12 @@ dependencies {
"com.fasterxml.jackson.module:jackson-module-scala_${sparkScala.scalaMajorVersion}"
)
testImplementation("com.fasterxml.jackson.core:jackson-databind")
testImplementation("org.eclipse.microprofile.openapi:microprofile-openapi-api")
testImplementation("ch.qos.logback:logback-classic")
testImplementation("org.slf4j:log4j-over-slf4j")
testImplementation(libs.microprofile.openapi)
testImplementation(libs.logback.classic)
testImplementation(libs.slf4j.log4j.over.slf4j)
testCompileOnly(libs.errorprone.annotations)

testImplementation("org.assertj:assertj-core")
testImplementation(libs.assertj.core)
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
Expand Down
40 changes: 29 additions & 11 deletions clients/iceberg-views/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,38 @@ plugins {

dependencies {
implementation(platform(nessieRootProject()))
implementation(nessieProjectPlatform("nessie-deps-iceberg", gradle))

implementation(nessieProject("nessie-client"))
implementation(nessieProject("nessie-model"))
implementation("org.apache.iceberg:iceberg-api")
implementation("org.apache.iceberg:iceberg-core")
implementation("org.apache.iceberg:iceberg-common")
implementation(
group = "org.apache.iceberg",
name = "iceberg-api",
version = dependencyVersion("versionIceberg")
)
implementation(
group = "org.apache.iceberg",
name = "iceberg-core",
version = dependencyVersion("versionIceberg")
)
implementation(
group = "org.apache.iceberg",
name = "iceberg-common",
version = dependencyVersion("versionIceberg")
)
implementation(
"org.apache.iceberg",
"iceberg-bundled-guava",
version = dependencyVersion("versionIceberg"),
configuration = if (isIntegrationsTestingEnabled()) "shadow" else null
)
implementation("org.apache.iceberg:iceberg-nessie") { exclude("org.projectnessie", "*") }
implementation("org.apache.hadoop:hadoop-client") {
implementation(
group = "org.apache.iceberg",
name = "iceberg-nessie",
version = dependencyVersion("versionIceberg")
) {
exclude("org.projectnessie", "*")
}
implementation(libs.hadoop.client) {
exclude("javax.servlet.jsp", "jsp-api")
exclude("javax.ws.rs", "javax.ws.rs-api")
exclude("log4j", "log4j")
Expand All @@ -46,17 +64,17 @@ dependencies {
exclude("com.sun.jersey", "jersey-servlet")
exclude("org.apache.hadoop", "hadoop-client")
}
compileOnly("org.eclipse.microprofile.openapi:microprofile-openapi-api")
compileOnly(libs.microprofile.openapi)

testImplementation(platform("org.junit:junit-bom"))
testImplementation(platform(libs.junit.bom))

testImplementation(nessieProject("nessie-versioned-persist-testextension"))
testImplementation(nessieProject("nessie-versioned-persist-in-memory"))
testImplementation(nessieProject("nessie-jaxrs-testextension"))
testImplementation("org.slf4j:log4j-over-slf4j")
testCompileOnly("org.eclipse.microprofile.openapi:microprofile-openapi-api")
testImplementation(libs.slf4j.log4j.over.slf4j)
testCompileOnly(libs.microprofile.openapi)

testImplementation("org.assertj:assertj-core")
testImplementation(libs.assertj.core)
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
Expand Down
3 changes: 1 addition & 2 deletions clients/spark-antlr-grammar/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ plugins {
}

dependencies {
antlr(nessieProjectPlatform("nessie-deps-antlr", gradle))
antlr("org.antlr:antlr4")
antlr(libs.antlr.antlr4)

api(platform(nessieRootProject()))
api(project(":nessie-spark-antlr-runtime", "shadow"))
Expand Down
2 changes: 1 addition & 1 deletion clients/spark-extensions-base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ dependencies {
compileOnly("org.apache.spark:spark-hive_${sparkScala.scalaMajorVersion}") {
forSpark(sparkScala.sparkVersion)
}
compileOnly("org.eclipse.microprofile.openapi:microprofile-openapi-api")
compileOnly(libs.microprofile.openapi)
implementation(nessieClientForIceberg())
}
20 changes: 9 additions & 11 deletions clients/spark-extensions-basetests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,25 @@ dependencies {
forScala(sparkScala.scalaVersion)

implementation(platform(nessieRootProject()))
implementation(nessieProjectPlatform("nessie-deps-testing", gradle))
compileOnly(nessieProjectPlatform("nessie-deps-build-only", gradle))
annotationProcessor(nessieProjectPlatform("nessie-deps-build-only", gradle))
implementation(platform("org.junit:junit-bom"))
implementation(platform(libs.junit.bom))

implementation(nessieProject("nessie-spark-extensions-grammar"))
compileOnly("org.apache.spark:spark-hive_${sparkScala.scalaMajorVersion}") {
forSpark(sparkScala.sparkVersion)
}
compileOnly("org.eclipse.microprofile.openapi:microprofile-openapi-api")
implementation(nessieClientForIceberg())

implementation("org.apache.spark:spark-sql_${sparkScala.scalaMajorVersion}") {
forSpark(sparkScala.sparkVersion)
}
implementation("org.eclipse.microprofile.openapi:microprofile-openapi-api")

compileOnly("org.immutables:value-annotations")
annotationProcessor("org.immutables:value-processor")
implementation(nessieClientForIceberg())

implementation(libs.microprofile.openapi)

compileOnly(libs.errorprone.annotations)
compileOnly(libs.immutables.value.annotations)
annotationProcessor(libs.immutables.value.processor)

implementation("org.assertj:assertj-core")
implementation(libs.assertj.core)
implementation("org.junit.jupiter:junit-jupiter-api")
implementation("org.junit.jupiter:junit-jupiter-params")
}
24 changes: 11 additions & 13 deletions clients/spark-extensions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ plugins {
`maven-publish`
signing
scala
id("com.github.johnrengelman.shadow")
id("org.projectnessie")
alias(libs.plugins.nessie.run)
`nessie-conventions`
}

applyShadowJar()

val sparkScala = getSparkScalaVersionsForProject()

dependencies {
// picks the right dependencies for scala compilation
forScala(sparkScala.scalaVersion)

implementation(platform(nessieRootProject()))
compileOnly(nessieProjectPlatform("nessie-deps-iceberg", gradle))

implementation(project(":nessie-spark-extensions-grammar"))
implementation(project(":nessie-spark-extensions-base_${sparkScala.scalaMajorVersion}"))
Expand All @@ -42,24 +42,22 @@ dependencies {
compileOnly("org.apache.spark:spark-hive_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) }
implementation(nessieClientForIceberg())

testImplementation(nessieProjectPlatform("nessie-deps-testing", gradle))
testImplementation(nessieProjectPlatform("nessie-deps-iceberg", gradle))
testImplementation(platform("org.junit:junit-bom"))
testImplementation(platform(libs.junit.bom))

testImplementation(project(":nessie-spark-extensions-basetests_${sparkScala.scalaMajorVersion}"))
testImplementation("org.apache.iceberg:iceberg-nessie")
testImplementation("org.apache.iceberg:iceberg-spark-${sparkScala.sparkMajorVersion}_${sparkScala.scalaMajorVersion}")
testImplementation(group = "org.apache.iceberg", name = "iceberg-nessie", version = dependencyVersion("versionIceberg"))
testImplementation(group = "org.apache.iceberg", name = "iceberg-spark-${sparkScala.sparkMajorVersion}_${sparkScala.scalaMajorVersion}", version = dependencyVersion("versionIceberg"))
testImplementation(
"org.apache.iceberg:iceberg-spark-extensions-${sparkScala.sparkMajorVersion}_${sparkScala.scalaMajorVersion}"
group = "org.apache.iceberg", name = "iceberg-spark-extensions-${sparkScala.sparkMajorVersion}_${sparkScala.scalaMajorVersion}", version = dependencyVersion("versionIceberg")
)
testImplementation("org.apache.iceberg:iceberg-hive-metastore")
testImplementation("ch.qos.logback:logback-classic")
testImplementation("org.slf4j:log4j-over-slf4j")
testImplementation(group = "org.apache.iceberg", name = "iceberg-hive-metastore", version = dependencyVersion("versionIceberg"))
testImplementation(libs.logback.classic)
testImplementation(libs.slf4j.log4j.over.slf4j)
testImplementation("org.apache.spark:spark-sql_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) }
testImplementation("org.apache.spark:spark-core_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) }
testImplementation("org.apache.spark:spark-hive_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) }

testImplementation("org.assertj:assertj-core")
testImplementation(libs.assertj.core)
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
Expand Down
31 changes: 15 additions & 16 deletions compatibility/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,32 @@ extra["maven.name"] = "Nessie - Backward Compatibility - Common"

dependencies {
implementation(platform(rootProject))
implementation(platform(project(":nessie-deps-testing")))
implementation(platform("com.fasterxml.jackson:jackson-bom"))
implementation(platform("org.junit:junit-bom"))
implementation(platform(libs.jackson.bom))
implementation(platform(libs.junit.bom))

api(project(":nessie-client"))
api(project(":nessie-compatibility-jersey"))
implementation(project(":nessie-services"))
implementation(project(":nessie-versioned-persist-adapter"))

implementation(platform("org.glassfish.jersey:jersey-bom"))
api("org.slf4j:slf4j-api")
api("ch.qos.logback:logback-classic")
implementation("org.apache.maven:maven-resolver-provider")
implementation("org.apache.maven.resolver:maven-resolver-connector-basic")
implementation("org.apache.maven.resolver:maven-resolver-transport-file")
implementation("org.apache.maven.resolver:maven-resolver-transport-http")
implementation("com.google.guava:guava")
implementation("jakarta.enterprise:jakarta.enterprise.cdi-api")
implementation("org.eclipse.microprofile.openapi:microprofile-openapi-api")
implementation(platform(libs.jersey.bom))
api(libs.slf4j.api)
api(libs.logback.classic)
implementation(libs.maven.resolver.provider)
implementation(libs.maven.resolver.connector.basic)
implementation(libs.maven.resolver.transport.file)
implementation(libs.maven.resolver.transport.http)
implementation(libs.guava)
implementation(libs.jakarta.enterprise.cdi.api)
implementation(libs.microprofile.openapi)
implementation("com.fasterxml.jackson.core:jackson-annotations")

api("org.junit.jupiter:junit-jupiter-api")
implementation("org.junit.jupiter:junit-jupiter-engine")
implementation("org.junit.platform:junit-platform-launcher")

testImplementation("org.mockito:mockito-core")
testImplementation("com.google.guava:guava")
testImplementation(libs.mockito.core)
testImplementation(libs.guava)
testImplementation(project(":nessie-versioned-persist-non-transactional-test"))
testImplementation(project(":nessie-versioned-persist-in-memory"))
testImplementation(project(":nessie-versioned-persist-in-memory-test"))
Expand All @@ -65,7 +64,7 @@ dependencies {
}

tasks.withType<Test>().configureEach {
systemProperty("rocksdb.version", dependencyVersion("versionRocksDb"))
systemProperty("rocksdb.version", libs.versions.rocksdb.get())
filter {
// Exclude test-classes for the tests
excludeTestsMatching("TestNessieCompatibilityExtensions\$*")
Expand Down
Loading

0 comments on commit 9bb61ef

Please sign in to comment.