diff --git a/build.gradle.kts b/build.gradle.kts index 43c95024d32..05c12a3b992 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,12 +15,11 @@ */ plugins { - `java-platform` `maven-publish` signing id("org.projectnessie.buildsupport.ide-integration") `nessie-conventions` - id("io.github.gradle-nexus.publish-plugin") + alias(libs.plugins.nexus.publish.plugin) } apply() @@ -29,250 +28,35 @@ extra["maven.name"] = "Nessie" description = "Transactional Catalog for Data Lakes" -/* -Main dependency handling happens in this build script. -Declare versions as variables and add dependency constraints. -This works for GitHub's dependabot, it can scan this file and create version-bump PRs. - -To use dependencies (without versions) from a "bom", import the bom using e.g. - implementation(platform("bom-coordinates")) - implementation("dependency-in-bom") - -The following declarations also contain some build dependencies. -*/ - -val versionAgroalPool = "2.0" -val versionAgrona = "1.17.1" -val versionAntlr = "4.11.1" -val versionAssertJ = "3.23.1" -val versionAwssdk = "2.17.278" -val versionBouncyCastle = "1.70" -val versionCel = "0.3.10" -val versionCheckstyle = "10.3.3" -// to fix circular dependencies with NessieClient, certain projects need to use the same Nessie -// version as Iceberg/Delta has -var versionClientNessie = "0.30.0" -val versionDeltalake = "1.1.0-nessie" -val versionDockerjava = "3.2.13" -val versionErrorProneAnnotations = "2.15.0" -val versionErrorProneCore = "2.15.0" -val versionErrorProneSlf4j = "0.1.15" -val versionGatling = "3.8.4" -val versionGuava = "31.1-jre" -val versionGoogleJavaFormat = "1.15.0" -val versionGraalSvm = "22.2.0" -val versionH2 = "2.1.214" -val versionHadoop = "3.3.4" -var versionIceberg = "0.14.1" -val versionImmutables = "2.9.2" -val versionJackson = "2.13.4" -val versionJacoco = "0.8.8" -val versionJakartaAnnotationApi = "1.3.5" -val versionJakartaEnterpriseCdiApi = "2.0.2" -val versionJakartaValidationApi = "2.0.2" -val versionJandex = "2.4.3.Final" -val versionJavaxServlet = "4.0.1" -val versionJavaxWsRs = "2.1.1" -val versionJaxrsApi21Spec = "2.0.2.Final" -val versionJetbrainsAnnotations = "23.0.0" -val versionJsr305 = "3.0.2" -val versionJersey = "2.35" -val versionJmh = "1.35" -val versionJunit = "5.9.1" -val versionLogback = "1.2.11" -val versionMavenResolver = "1.7.3" -val versionMaven = "3.8.6" -val versionMicrometer = "1.9.2" -val versionMockito = "4.8.0" -val versionMongodbDriverSync = "4.7.1" -val versionNessieApprunner = "0.21.4" -val versionOpenapi = "3.0" -val versionOpentracing = "0.33.0" -val versionQuarkus = dependencyVersion("versionQuarkus") // ensure that plugin version is the same -val versionQuarkusAmazon = "2.12.3.Final" -val versionQuarkusLoggingSentry = "1.2.1" -val versionParquet = "1.12.3" -val versionPicocli = "4.6.3" -val versionPostgres = "42.5.0" -val versionProtobuf = "3.21.6" -val versionReactor = "2020.0.21" -val versionRestAssured = "5.2.0" -val versionRocksDb = "7.5.3" -val versionSlf4j = "1.7.36" -val versionTestcontainers = "1.17.3" -val versionWeld = "3.1.8.Final" - -// Allow overriding the Iceberg version used by Nessie -versionIceberg = System.getProperty("nessie.versionIceberg", versionIceberg) - -// Allow overriding the Nessie version used by integration tests that depend on Iceberg -versionClientNessie = System.getProperty("nessie.versionClientNessie", versionClientNessie) +// To fix circular dependencies with NessieClient, certain projects need to use the same Nessie +// version as Iceberg/Delta has. +// Allow overriding the Iceberg version used by Nessie and the Nessie version used by integration +// tests that depend on Iceberg. +val versionIceberg: String = + System.getProperty("nessie.versionIceberg", libs.versions.iceberg.get()) +val versionClientNessie: String = + System.getProperty("nessie.versionClientNessie", libs.versions.nessieClientVersion.get()) mapOf( - "versionAgrona" to versionAgrona, - "versionAwssdk" to versionAwssdk, - "versionCheckstyle" to versionCheckstyle, + "versionCheckstyle" to libs.versions.checkstyle.get(), "versionClientNessie" to versionClientNessie, - "versionErrorProneAnnotations" to versionErrorProneAnnotations, - "versionErrorProneCore" to versionErrorProneCore, - "versionErrorProneSlf4j" to versionErrorProneSlf4j, - "versionGatling" to versionGatling, - "versionGoogleJavaFormat" to versionGoogleJavaFormat, - "versionHadoop" to versionHadoop, - "versionJacoco" to versionJacoco, - "versionJandex" to versionJandex, - "versionLogback" to versionLogback, - "versionMicrometer" to versionMicrometer, - "versionOpentracing" to versionOpentracing, - "versionProtobuf" to versionProtobuf, - "versionRocksDb" to versionRocksDb, - "quarkus.builder-image" to "quay.io/quarkus/ubi-quarkus-native-image:22.2-java17" + "versionIceberg" to versionIceberg, + "versionErrorProneCore" to libs.versions.errorprone.get(), + "versionErrorProneSlf4j" to libs.versions.errorproneSlf4j.get(), + "versionGoogleJavaFormat" to libs.versions.googleJavaFormat.get(), + "versionJacoco" to libs.versions.jacoco.get(), + "versionJandex" to libs.versions.jandex.get(), + "versionScala-2.12" to libs.scala.library.v212.get().versionConstraint.preferredVersion, + "versionScala-2.13" to libs.scala.library.v213.get().versionConstraint.preferredVersion, + "versionSpark-3.1" to libs.spark.sql.v31.v212.get().versionConstraint.preferredVersion, + "versionSpark-3.2" to libs.spark.sql.v32.v212.get().versionConstraint.preferredVersion, + "versionSpark-3.3" to libs.spark.sql.v33.v212.get().versionConstraint.preferredVersion, + "quarkus.builder-image" to + "quay.io/quarkus/ubi-quarkus-native-image:${libs.versions.quarkusUbiNativeImage.get()}" ) .plus(loadProperties(file("clients/spark-scala.properties"))) .forEach { (k, v) -> extra[k.toString()] = v } -dependencies { - constraints { - api("com.fasterxml.jackson:jackson-bom:$versionJackson") - api("com.google.code.findbugs:jsr305:$versionJsr305") - api("com.google.guava:guava:$versionGuava") - api("com.google.protobuf:protobuf-java:$versionProtobuf") - api("info.picocli:picocli:$versionPicocli") - api("io.quarkus:quarkus-smallrye-opentracing:$versionQuarkus") - api("jakarta.annotation:jakarta.annotation-api:$versionJakartaAnnotationApi") - api("jakarta.enterprise:jakarta.enterprise.cdi-api:$versionJakartaEnterpriseCdiApi") - api("jakarta.validation:jakarta.validation-api:$versionJakartaValidationApi") - api("javax.servlet:javax.servlet-api:$versionJavaxServlet") - api("javax.ws.rs:javax.ws.rs-api:$versionJavaxWsRs") - api("org.eclipse.microprofile.openapi:microprofile-openapi-api:$versionOpenapi") - api("org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.1_spec:$versionJaxrsApi21Spec") - api("org.projectnessie.cel:cel-bom:$versionCel") - api("org.slf4j:slf4j-api:$versionSlf4j") - api("software.amazon.awssdk:auth:$versionAwssdk") - } -} - -dependenciesProject("nessie-deps-antlr", "Antlr4 dependency management") { - api("org.antlr:antlr4:$versionAntlr") - api("org.antlr:antlr4-runtime:$versionAntlr") -} - -dependenciesProject("nessie-deps-managed-only", "Only managed dependencies (for dependabot)") { - // This one is only here to get these dependencies, which are used outside of the usual - // configurations, managed by dependabot. - api("com.google.errorprone:error_prone_core:$versionErrorProneCore") - api("com.google.googlejavaformat:google-java-format:$versionGoogleJavaFormat") - api("jp.skypencil.errorprone.slf4j:errorprone-slf4j:$versionErrorProneSlf4j") - api("org.jacoco:jacoco-maven-plugin:$versionJacoco") - api("org.jboss:jandex:$versionJandex") - api("io.opentracing:opentracing-api:${dependencyVersion("versionOpentracing")}") - api("io.opentracing:opentracing-mock:${dependencyVersion("versionOpentracing")}") - api("io.opentracing:opentracing-util:${dependencyVersion("versionOpentracing")}") - api("io.micrometer:micrometer-core:${dependencyVersion("versionMicrometer")}") -} - -dependenciesProject("nessie-deps-persist", "Persistence/server dependency management") { - api("io.agroal:agroal-pool:$versionAgroalPool") - api("com.h2database:h2:$versionH2") - api("org.agrona:agrona:$versionAgrona") - api("org.mongodb:mongodb-driver-sync:$versionMongodbDriverSync") - api("org.postgresql:postgresql:$versionPostgres") - api("org.rocksdb:rocksdbjni:$versionRocksDb") -} - -dependenciesProject("nessie-deps-quarkus", "Quarkus related dependency management") { - api("io.quarkus:quarkus-bom:$versionQuarkus") - api("io.quarkus.platform:quarkus-amazon-services-bom:$versionQuarkusAmazon") - api("software.amazon.awssdk:bom:$versionAwssdk") - api("io.quarkiverse.loggingsentry:quarkus-logging-sentry:$versionQuarkusLoggingSentry") -} - -dependenciesProject("nessie-deps-build-only", "Build-only dependency management") { - api("com.google.errorprone:error_prone_annotations:$versionErrorProneAnnotations") - api("info.picocli:picocli-codegen:$versionPicocli") - api("org.graalvm.nativeimage:svm:$versionGraalSvm") - api("org.immutables:builder:$versionImmutables") - api("org.immutables:value-annotations:$versionImmutables") - api("org.immutables:value-fixture:$versionImmutables") - api("org.immutables:value-processor:$versionImmutables") - api("org.jetbrains:annotations:$versionJetbrainsAnnotations") - api("org.openjdk.jmh:jmh-generator-annprocess:$versionJmh") -} - -dependenciesProject("nessie-deps-iceberg", "Iceberg, Spark and related dependency management") { - api("io.delta:delta-core_2.12:$versionDeltalake") - api("org.apache.hadoop:hadoop-aws:$versionHadoop") - api("org.apache.hadoop:hadoop-client:$versionHadoop") - api("org.apache.hadoop:hadoop-common:$versionHadoop") - api("org.apache.iceberg:iceberg-api:$versionIceberg") - api("org.apache.iceberg:iceberg-aws:$versionIceberg") - api("org.apache.iceberg:iceberg-bundled-guava:$versionIceberg") - api("org.apache.iceberg:iceberg-common:$versionIceberg") - api("org.apache.iceberg:iceberg-core:$versionIceberg") - api("org.apache.iceberg:iceberg-gcp:$versionIceberg") - api("org.apache.iceberg:iceberg-hive-metastore:$versionIceberg") - api("org.apache.iceberg:iceberg-nessie:$versionIceberg") - api("org.apache.iceberg:iceberg-parquet:$versionIceberg") - for (sparkVersion in rootProject.extra["sparkVersions"].toString().split(",")) { - for (scalaVersion in - rootProject.extra["sparkVersion-$sparkVersion-scalaVersions"].toString().split(",")) { - api("org.apache.iceberg:iceberg-spark-${sparkVersion}_$scalaVersion:$versionIceberg") - api( - "org.apache.iceberg:iceberg-spark-extensions-${sparkVersion}_$scalaVersion:$versionIceberg" - ) - } - } - api("org.apache.parquet:parquet-column:$versionParquet") -} - -dependenciesProject("nessie-deps-testing", "Testing dependency management") { - api("ch.qos.logback:logback-classic:$versionLogback") - api("com.github.docker-java:docker-java-api:$versionDockerjava") - api("com.puppycrawl.tools:checkstyle:$versionCheckstyle") - api("io.gatling.highcharts:gatling-charts-highcharts:$versionGatling") - api("io.rest-assured:rest-assured:$versionRestAssured") - api("org.assertj:assertj-core:$versionAssertJ") - api("org.apache.maven:maven-resolver-provider:$versionMaven") - api("org.apache.maven.resolver:maven-resolver-connector-basic:$versionMavenResolver") - api("org.apache.maven.resolver:maven-resolver-transport-file:$versionMavenResolver") - api("org.apache.maven.resolver:maven-resolver-transport-http:$versionMavenResolver") - api("org.bouncycastle:bcprov-jdk15on:$versionBouncyCastle") - api("org.bouncycastle:bcpkix-jdk15on:$versionBouncyCastle") - api("org.glassfish.jersey:jersey-bom:$versionJersey") - api("org.mockito:mockito-core:$versionMockito") - api("org.openjdk.jmh:jmh-core:$versionJmh") - api("org.jboss.weld.se:weld-se-core:$versionWeld") - api("org.junit:junit-bom:$versionJunit") - api("org.slf4j:jcl-over-slf4j:$versionSlf4j") - api("org.slf4j:log4j-over-slf4j:$versionSlf4j") - api("org.testcontainers:cockroachdb:$versionTestcontainers") - api("org.testcontainers:mongodb:$versionTestcontainers") - api("org.testcontainers:postgresql:$versionTestcontainers") - api("org.testcontainers:testcontainers:$versionTestcontainers") -} - -fun dependenciesProject( - name: String, - description: String, - config: Action -) { - project(":$name") { - this.buildDir = file(rootProject.buildDir.resolve(name)) - this.group = rootProject.group - this.version = rootProject.version - this.description = description - - apply { - plugin("java-platform") - plugin("maven-publish") - plugin("signing") - plugin("nessie-conventions") - } - - dependencies { constraints { config.execute(this) } } - } -} - tasks.named("wrapper") { distributionType = Wrapper.DistributionType.ALL } // Pass environment variables: diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index ea98203f007..e7c4337712b 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -14,8 +14,6 @@ * limitations under the License. */ -import java.util.Properties - plugins { `kotlin-dsl` } repositories { @@ -26,40 +24,25 @@ repositories { } } -// Use the versions declared in the top-level settings.gradle.kts. We can safely assume that -// the properties file exists, because the top-level settings.gradle.kts is executed before -// buildSrc's settings.gradle.kts or build.gradle.kts. -val versions = Properties() - -file("../build/nessieBuild/versions.properties").inputStream().use { versions.load(it) } - -val versionIdeaExtPlugin = versions["versionIdeaExtPlugin"] -val versionSpotlessPlugin = versions["versionSpotlessPlugin"] -val versionNessieBuildPlugins = versions["versionNessieBuildPlugins"] -val versionErrorPronePlugin = versions["versionErrorPronePlugin"] -val versionJandexPlugin = versions["versionJandexPlugin"] -val versionQuarkus = versions["versionQuarkus"] -val versionShadowPlugin = versions["versionShadowPlugin"] - dependencies { implementation(gradleKotlinDsl()) - implementation("com.diffplug.spotless:spotless-plugin-gradle:$versionSpotlessPlugin") - implementation("com.github.vlsi.gradle:jandex-plugin:$versionJandexPlugin") - implementation("gradle.plugin.com.github.johnrengelman:shadow:$versionShadowPlugin") - implementation("io.quarkus:gradle-application-plugin:$versionQuarkus") - implementation("org.projectnessie.buildsupport:checkstyle:$versionNessieBuildPlugins") - implementation("org.projectnessie.buildsupport:errorprone:$versionNessieBuildPlugins") - implementation("org.projectnessie.buildsupport:ide-integration:$versionNessieBuildPlugins") - implementation("org.projectnessie.buildsupport:jacoco:$versionNessieBuildPlugins") - implementation("org.projectnessie.buildsupport:jandex:$versionNessieBuildPlugins") - implementation("org.projectnessie.buildsupport:protobuf:$versionNessieBuildPlugins") - implementation("org.projectnessie.buildsupport:publishing:$versionNessieBuildPlugins") - implementation("org.projectnessie.buildsupport:reflection-config:$versionNessieBuildPlugins") - implementation("org.projectnessie.buildsupport:smallrye-openapi:$versionNessieBuildPlugins") - implementation("org.projectnessie.buildsupport:spotless:$versionNessieBuildPlugins") - - testImplementation(platform("org.junit:junit-bom:5.9.0")) - testImplementation("org.assertj:assertj-core:3.23.1") + val ver = libs.versions + implementation("com.diffplug.spotless:spotless-plugin-gradle:${ver.spotlessPlugin.get()}") + implementation("com.github.vlsi.gradle:jandex-plugin:${ver.jandexPlugin.get()}") + implementation("gradle.plugin.com.github.johnrengelman:shadow:${ver.shadowPlugin.get()}") + val nessieVer = ver.nessieBuildPlugins.get() + implementation("org.projectnessie.buildsupport:checkstyle:$nessieVer") + implementation("org.projectnessie.buildsupport:errorprone:$nessieVer") + implementation("org.projectnessie.buildsupport:ide-integration:$nessieVer") + implementation("org.projectnessie.buildsupport:jacoco:$nessieVer") + implementation("org.projectnessie.buildsupport:jandex:$nessieVer") + implementation("org.projectnessie.buildsupport:protobuf:$nessieVer") + implementation("org.projectnessie.buildsupport:publishing:$nessieVer") + implementation("org.projectnessie.buildsupport:reflection-config:$nessieVer") + implementation("org.projectnessie.buildsupport:spotless:$nessieVer") + + testImplementation(platform(libs.junit.bom)) + 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") diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts index c39a85303ee..219619f6cc1 100644 --- a/buildSrc/settings.gradle.kts +++ b/buildSrc/settings.gradle.kts @@ -14,4 +14,6 @@ * limitations under the License. */ -// Recommended to exist, even if empty +dependencyResolutionManagement { + versionCatalogs { create("libs") { from(files("../gradle/libs.versions.toml")) } } +} diff --git a/buildSrc/src/main/kotlin/Utilities.kt b/buildSrc/src/main/kotlin/Utilities.kt index 4fc1961d0be..d8260511a58 100644 --- a/buildSrc/src/main/kotlin/Utilities.kt +++ b/buildSrc/src/main/kotlin/Utilities.kt @@ -14,6 +14,8 @@ * limitations under the License. */ +import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import com.github.vlsi.jandex.JandexProcessResources import java.io.File import java.util.Properties @@ -22,11 +24,11 @@ import org.gradle.api.Project import org.gradle.api.artifacts.Dependency import org.gradle.api.artifacts.ExternalModuleDependency import org.gradle.api.artifacts.ModuleDependency -import org.gradle.api.invocation.Gradle import org.gradle.api.plugins.JavaPluginExtension import org.gradle.api.publish.PublishingExtension import org.gradle.api.publish.maven.MavenPublication import org.gradle.api.tasks.SourceSetContainer +import org.gradle.api.tasks.bundling.Jar import org.gradle.api.tasks.testing.Test import org.gradle.jvm.toolchain.JavaLanguageVersion import org.gradle.jvm.toolchain.JavaToolchainService @@ -37,6 +39,7 @@ import org.gradle.kotlin.dsl.exclude import org.gradle.kotlin.dsl.extra import org.gradle.kotlin.dsl.findByType import org.gradle.kotlin.dsl.module +import org.gradle.kotlin.dsl.named import org.gradle.kotlin.dsl.project import org.gradle.kotlin.dsl.provideDelegate import org.gradle.kotlin.dsl.withType @@ -74,8 +77,8 @@ fun ModuleDependency.withSparkExcludes(): ModuleDependency { fun DependencyHandlerScope.forScala(scalaVersion: String) { // Note: Quarkus contains Scala dependencies since 2.9.0 - add("implementation", "org.scala-lang:scala-library") { version { strictly(scalaVersion) } } - add("implementation", "org.scala-lang:scala-reflect") { version { strictly(scalaVersion) } } + add("implementation", "org.scala-lang:scala-library:$scalaVersion!!") + add("implementation", "org.scala-lang:scala-reflect:$scalaVersion!!") } /** @@ -149,33 +152,27 @@ fun DependencyHandlerScope.nessieProject( } } -/** - * Resolves a `platform()` dependency to a project in another Gradle build. - * - * Ideally, it should be sufficient to use [nessieProject], but that does not work properly and - * results in this Gradle error: `Incompatible because this component declares a platform and the - * consumer needed a library`. Although it is correct that the component declares a platform, it is - * wrong that the consumer needs a library... - */ -fun DependencyHandlerScope.nessieProjectPlatform(artifactId: String, gradle: Gradle): Dependency { - if (!isIntegrationsTestingEnabled()) { - return platform(project(if (artifactId == "nessie") ":" else ":$artifactId")) - } else { - if (artifactId.startsWith("nessie-deps-")) { - val inclBuild = gradle.parent!!.includedBuild("nessie") - val inclBuildInternal = inclBuild as org.gradle.internal.composite.IncludedBuildInternal - val inclBuildTarget = inclBuildInternal.target - val nessiePrj = inclBuildTarget.projects.getProject(org.gradle.util.Path.path(":$artifactId")) - val model = nessiePrj.mutableModel - return platform(model.project) +/** Utility method to check whether a Quarkus build shall produce the uber-jar. */ +fun Project.withUberJar(): Boolean = hasProperty("uber-jar") || isIntegrationsTestingEnabled() + +fun Project.applyShadowJar() { + plugins.apply(ShadowPlugin::class.java) + + plugins.withType().configureEach { + val shadowJar = + tasks.named("shadowJar") { + outputs.cacheIf { false } // do not cache uber/shaded jars + archiveClassifier.set("") + mergeServiceFiles() + } + + tasks.named("jar") { + dependsOn(shadowJar) + archiveClassifier.set("raw") } - return platform(module("org.projectnessie", artifactId)) } } -/** Utility method to check whether a Quarkus build shall produce the uber-jar. */ -fun Project.withUberJar(): Boolean = hasProperty("uber-jar") || isIntegrationsTestingEnabled() - /** Just load [Properties] from a [File]. */ fun loadProperties(file: File): Properties { val props = Properties() diff --git a/buildSrc/src/main/kotlin/nessie-conventions.gradle.kts b/buildSrc/src/main/kotlin/nessie-conventions.gradle.kts index b5407e3f60e..316d12539af 100644 --- a/buildSrc/src/main/kotlin/nessie-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/nessie-conventions.gradle.kts @@ -14,10 +14,7 @@ * limitations under the License. */ -import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import com.github.vlsi.jandex.JandexExtension -import io.quarkus.gradle.QuarkusPlugin import org.gradle.api.JavaVersion import org.gradle.api.Project import org.gradle.api.file.DuplicatesStrategy @@ -58,8 +55,6 @@ testTasks() scaladocJar() -replaceJarWithUberJar() - fun Project.scaladocJar() { plugins.withType().configureEach { val scaladoc = tasks.named("scaladoc") @@ -124,7 +119,7 @@ fun Project.testTasks() { mustRunAfter(tasks.named("test")) } - if (plugins.withType().isNotEmpty()) { + if (plugins.hasPlugin("io.quarkus")) { jvmArgs("--add-opens=java.base/java.util=ALL-UNNAMED") systemProperty("quarkus.log.level", testLogLevel()) systemProperty("quarkus.log.console.level", testLogLevel()) @@ -142,7 +137,7 @@ fun Project.testTasks() { group = "verification" description = "Runs the integration tests." - if (plugins.withType().isNotEmpty()) { + if (plugins.hasPlugin("io.quarkus")) { dependsOn(tasks.named("quarkusBuild")) } } @@ -196,18 +191,3 @@ fun Project.configureJava() { } } } - -fun Project.replaceJarWithUberJar() { - plugins.withType().configureEach { - val shadowJar = - tasks.named("shadowJar") { - archiveClassifier.set("") - mergeServiceFiles() - } - - tasks.named("jar") { - dependsOn(shadowJar) - archiveClassifier.set("raw") - } - } -} diff --git a/clients/spark-scala.properties b/clients/spark-scala.properties index 59d3f990dae..a577a08993a 100644 --- a/clients/spark-scala.properties +++ b/clients/spark-scala.properties @@ -24,10 +24,3 @@ sparkVersions=3.1,3.2,3.3 sparkVersion-3.1-scalaVersions=2.12 sparkVersion-3.2-scalaVersions=2.12,2.13 sparkVersion-3.3-scalaVersions=2.12,2.13 - -versionSpark-3.1=3.1.2 -versionSpark-3.2=3.2.1 -versionSpark-3.3=3.3.0 - -versionScala-2.12=2.12.16 -versionScala-2.13=2.13.8 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000000..2e47cca2544 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,177 @@ +[versions] +agrone = "1.17.1" +antlr4 = "4.11.1" +awssdk = "2.17.278" +bouncyCastle = "1.70" +checkstyle = "10.3.3" +errorprone = "2.15.0" +errorproneSlf4j = "0.1.15" +gatling = "3.8.4" +googleJavaFormat = "1.15.0" +guava = "31.1-jre" +hadoop = "3.3.4" +iceberg = "0.14.1" +immutables = "2.9.2" +jacoco = "0.8.8" +jandex = "2.4.3.Final" +jandexPlugin = "1.82" +jmh = "1.35" +junit = "5.9.1" +logback = "1.2.11" +maven = "3.8.6" +mavenResolver = "1.7.3" +micrometer = "1.9.2" +nessieBuildPlugins = "0.2.12" +nessieClientVersion = "0.30.0" +opentracing = "0.33.0" +parquet = "1.12.3" +picocli = "4.6.3" +protobuf = "3.21.6" +quarkus = "2.12.3.Final" +quarkusAmazon = "2.12.3.Final" +quarkusLoggingSentry = "1.2.1" +quarkusUbiNativeImage = "22.2-java17" +rocksdb = "7.5.3" +shadowPlugin = "7.1.2" +slf4j = "1.7.36" +spotlessPlugin = "6.11.0" +testcontainers = "1.17.3" + +[bundles] +awssdk = ["awssdk-auth", "awssdk-bom"] +errorprone = ["errorprone-annotations", "errorprone-core"] +iceberg = ["iceberg-api", "iceberg-bundled-guava", "iceberg-common", "iceberg-core", + "iceberg-hive-metastore", "iceberg-nessie", "iceberg-parquet", + "iceberg-spark-extensions31-spark212", + "iceberg-spark-extensions32-spark212", "iceberg-spark-extensions32-spark213", + "iceberg-spark-extensions33-spark212", "iceberg-spark-extensions33-spark213", + "iceberg-spark31-spark212", + "iceberg-spark32-spark212", "iceberg-spark32-spark213", + "iceberg-spark33-spark212", "iceberg-spark33-spark213"] +immutables = ["immutables-value-annotations", "immutables-value-fixture", "immutables-value-processor"] +jms = ["jmh-core", "jmh-generator-annprocess"] +maven-resolver = ["maven-resolver-connector-basic", "maven-resolver-transport-file", "maven-resolver-transport-http"] +opentracing = ["opentracing-api", "opentracing-mock", "opentracing-util"] +picocli = ["picocli", "picocli-codegen"] +slf4j = ["slf4j-jcl-over-slf4j", "slf4j-log4j-over-slf4j"] +testcontainers = ["testcontainers-cockroachdb", "testcontainers-mongodb", "testcontainers-postgresql", "testcontainers-testcontainers"] + +[libraries] +agroal-pool = { module = "io.agroal:agroal-pool", version = "2.0" } +agrona = { module = "org.agrona:agrona", version = "1.16.0" } +antlr-antlr4 = { module = "org.antlr:antlr4", version.ref = "antlr4" } +antlr-antlr4-runtime = { module = "org.antlr:antlr4-runtime", version.ref = "antlr4" } +assertj-core = { module = "org.assertj:assertj-core", version = "3.23.1" } +awssdk-auth = { module = "software.amazon.awssdk:auth", version.ref = "awssdk" } +awssdk-bom = { module = "software.amazon.awssdk:bom", version.ref = "awssdk" } +bouncycastle-bcpkix = { module = "org.bouncycastle:bcpkix-jdk15on", version.ref = "bouncyCastle" } +bouncycastle-bcprov = { module = "org.bouncycastle:bcprov-jdk15on", version.ref = "bouncyCastle" } +cel-bom = { module = "org.projectnessie.cel:cel-bom", version = "0.3.10" } +checkstyle = { module = "com.puppycrawl.tools:checkstyle", version.ref = "checkstyle" } +delta-core = { module = "io.delta:delta-core_2.12", version = "1.1.0-nessie" } +docker-java-api = { module = "com.github.docker-java:docker-java-api", version = "3.2.13" } +errorprone-annotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "errorprone" } +errorprone-core = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" } +errorprone-slf4j = { module = "jp.skypencil.errorprone.slf4j:errorprone-slf4j", version.ref = "errorproneSlf4j" } +findbugs-jsr305 = { module = "com.google.code.findbugs:jsr305", version = "3.0.2" } +gatling-charts-highcharts = { module = "io.gatling.highcharts:gatling-charts-highcharts", version.ref = "gatling" } +google-java-format = { module = "com.google.googlejavaformat:google-java-format", version.ref = "googleJavaFormat" } +graalvm-nativeimage-svm = { module = "org.graalvm.nativeimage:svm", version = "22.2.0" } +guava = { module = "com.google.guava:guava", version.ref = "guava" } +h2 = { module = "com.h2database:h2", version = "2.1.214" } +hadoop-client = { module = "org.apache.hadoop:hadoop-client", version.ref = "hadoop" } +iceberg-api = { module = "org.apache.iceberg:iceberg-api", version.ref = "iceberg" } +iceberg-bundled-guava = { module = "org.apache.iceberg:iceberg-bundled-guava", version.ref = "iceberg" } +iceberg-common = { module = "org.apache.iceberg:iceberg-common", version.ref = "iceberg" } +iceberg-core = { module = "org.apache.iceberg:iceberg-core", version.ref = "iceberg" } +iceberg-hive-metastore = { module = "org.apache.iceberg:iceberg-hive-metastore", version.ref = "iceberg" } +iceberg-nessie = { module = "org.apache.iceberg:iceberg-nessie", version.ref = "iceberg" } +iceberg-parquet = { module = "org.apache.iceberg:iceberg-parquet", version.ref = "iceberg" } +iceberg-spark-extensions31-spark212 = { module = "org.apache.iceberg:iceberg-spark-extensions-3.1_2.12", version.ref = "iceberg" } +iceberg-spark-extensions32-spark212 = { module = "org.apache.iceberg:iceberg-spark-extensions-3.2_2.12", version.ref = "iceberg" } +iceberg-spark-extensions32-spark213 = { module = "org.apache.iceberg:iceberg-spark-extensions-3.2_2.13", version.ref = "iceberg" } +iceberg-spark-extensions33-spark212 = { module = "org.apache.iceberg:iceberg-spark-extensions-3.3_2.12", version.ref = "iceberg" } +iceberg-spark-extensions33-spark213 = { module = "org.apache.iceberg:iceberg-spark-extensions-3.3_2.13", version.ref = "iceberg" } +iceberg-spark31-spark212 = { module = "org.apache.iceberg:iceberg-spark-3.1_2.12", version.ref = "iceberg" } +iceberg-spark32-spark212 = { module = "org.apache.iceberg:iceberg-spark-3.2_2.12", version.ref = "iceberg" } +iceberg-spark32-spark213 = { module = "org.apache.iceberg:iceberg-spark-3.2_2.13", version.ref = "iceberg" } +iceberg-spark33-spark212 = { module = "org.apache.iceberg:iceberg-spark-3.3_2.12", version.ref = "iceberg" } +iceberg-spark33-spark213 = { module = "org.apache.iceberg:iceberg-spark-3.3_2.13", version.ref = "iceberg" } +immutables-builder = { module = "org.immutables:builder", version.ref = "immutables" } +immutables-value-annotations = { module = "org.immutables:value-annotations", version.ref = "immutables" } +immutables-value-fixture = { module = "org.immutables:value-fixture", version.ref = "immutables" } +immutables-value-processor = { module = "org.immutables:value-processor", version.ref = "immutables" } +jackson-bom = { module = "com.fasterxml.jackson:jackson-bom", version = "2.13.4" } +jacoco-maven-plugin = { module = "org.jacoco:jacoco-maven-plugin", version.ref = "jacoco" } +jakarta-annotation-api = { module = "jakarta.annotation:jakarta.annotation-api", version = "1.3.5" } +jakarta-enterprise-cdi-api = { module = "jakarta.enterprise:jakarta.enterprise.cdi-api", version = "2.0.2" } +jakarta-validation-api = { module = "jakarta.validation:jakarta.validation-api", version = "2.0.2" } +jandex = { module = "org.jboss:jandex", version.ref = "jandex" } +javax-servlet = { module = "javax.servlet:javax.servlet-api", version = "4.0.1" } +javax-ws-rs = { module = "javax.ws.rs:javax.ws.rs-api", version = "2.1.1" } +javax-ws-rs21 = { module = "org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.1_spec", version = "2.0.2.Final" } +jersey-bom = { module = "org.glassfish.jersey:jersey-bom", version = "2.37" } +jetbrains-annotations = { module = "org.jetbrains:annotations", version = "23.0.0" } +jmh-core = { module = "org.openjdk.jmh:jmh-core", version.ref = "jmh" } +jmh-generator-annprocess = { module = "org.openjdk.jmh:jmh-generator-annprocess", version.ref = "jmh" } +junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" } +logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logback" } +maven-resolver-connector-basic = { module = "org.apache.maven.resolver:maven-resolver-connector-basic", version.ref = "mavenResolver" } +maven-resolver-provider = { module = "org.apache.maven:maven-resolver-provider", version.ref = "maven" } +maven-resolver-transport-file = { module = "org.apache.maven.resolver:maven-resolver-transport-file", version.ref = "mavenResolver" } +maven-resolver-transport-http = { module = "org.apache.maven.resolver:maven-resolver-transport-http", version.ref = "mavenResolver" } +micrometer-core = { module = "io.micrometer:micrometer-core", version.ref = "micrometer" } +microprofile-openapi = { module = "org.eclipse.microprofile.openapi:microprofile-openapi-api", version = "3.0" } +mockito-core = { module = "org.mockito:mockito-core", version = "4.8.0" } +mongodb-driver-sync = { module = "org.mongodb:mongodb-driver-sync", version = "4.7.1" } +opentracing-api = { module = "io.opentracing:opentracing-api", version.ref = "opentracing" } +opentracing-mock = { module = "io.opentracing:opentracing-mock", version.ref = "opentracing" } +opentracing-util = { module = "io.opentracing:opentracing-util", version.ref = "opentracing" } +parquet-column = { module = "org.apache.parquet:parquet-column", version.ref = "parquet" } +picocli = { module = "info.picocli:picocli-codegen", version.ref = "picocli" } +picocli-codegen = { module = "info.picocli:picocli-codegen", version.ref = "picocli" } +postgresql = { module = "org.postgresql:postgresql", version = "42.5.0" } +protobuf-java = { module = "com.google.protobuf:protobuf-java", version.ref = "protobuf" } +quarkus-amazon-services-bom = { module = "io.quarkus.platform:quarkus-amazon-services-bom", version.ref = "quarkusAmazon" } +quarkus-bom = { module = "io.quarkus:quarkus-bom", version.ref = "quarkus" } +quarkus-logging-sentry = { module = "io.quarkiverse.loggingsentry:quarkus-logging-sentry", version.ref = "quarkusLoggingSentry" } +quarkus-smallrye-opentracing = { module = "io.quarkus:quarkus-smallrye-opentracing", version.ref = "quarkus" } +rest-assured = { module = "io.rest-assured:rest-assured", version = "5.2.0" } +rocksdb-jni = { module = "org.rocksdb:rocksdbjni", version.ref = "rocksdb" } +scala-library-v212 = { module = "org.scala-lang:scala-library", version = { strictly = "[2.12, 2.13[", prefer = "2.12.16" }} +scala-library-v213 = { module = "org.scala-lang:scala-library", version = { strictly = "[2.13, 2.14[", prefer = "2.13.8"}} +slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" } +slf4j-jcl-over-slf4j = { module = "org.slf4j:jcl-over-slf4j", version.ref = "slf4j" } +slf4j-log4j-over-slf4j = { module = "org.slf4j:log4j-over-slf4j", version.ref = "slf4j" } +spark-sql-v31-v212 = { module = "org.apache.spark:spark-sql_2_12", version = { strictly = "[3.1, 3.2[", prefer = "3.1.2"}} +spark-sql-v32-v212 = { module = "org.apache.spark:spark-sql_2_12", version = { strictly = "[3.2, 3.3[", prefer = "3.2.1"}} +spark-sql-v33-v212 = { module = "org.apache.spark:spark-sql_2_12", version = { strictly = "[3.3, 3.4[", prefer = "3.3.0"}} +testcontainers-cockroachdb = { module = "org.testcontainers:cockroachdb", version.ref = "testcontainers" } +testcontainers-mongodb = { module = "org.testcontainers:mongodb", version.ref = "testcontainers" } +testcontainers-postgresql = { module = "org.testcontainers:postgresql", version.ref = "testcontainers" } +testcontainers-testcontainers = { module = "org.testcontainers:testcontainers", version.ref = "testcontainers" } +weld-se-core = { module = "org.jboss.weld.se:weld-se-core", version = "3.1.9.Final" } + +[plugins] +errorprone = { id = "net.ltgt.errorprone", version = "2.0.2" } +gatling = { id = "io.gatling.gradle", version = "3.8.3.2" } +idea-ext = { id = "org.jetbrains.gradle.plugin.idea-ext", version = "1.1.6" } +jandex = { id = "com.github.vlsi.jandex", version.ref = "jandexPlugin" } +jmh = { id = "me.champeau.jmh", version = "0.6.7" } +nessie-build-checkstyle = { id = "org.projectnessie.buildsupport.checkstyle", version.ref = "nessieBuildPlugins" } +nessie-build-errorprone = { id = "org.projectnessie.buildsupport.errorprone", version.ref = "nessieBuildPlugins" } +nessie-build-ide-integration = { id = "org.projectnessie.buildsupport.ide-integration", version.ref = "nessieBuildPlugins" } +nessie-build-jacoco = { id = "org.projectnessie.buildsupport.jacoco", version.ref = "nessieBuildPlugins" } +nessie-build-jacoco-aggregator = { id = "org.projectnessie.buildsupport.jacoco-aggregator", version.ref = "nessieBuildPlugins" } +nessie-build-jandex = { id = "org.projectnessie.buildsupport.jandex", version.ref = "nessieBuildPlugins" } +nessie-build-protobuf = { id = "org.projectnessie.buildsupport.protobuf", version.ref = "nessieBuildPlugins" } +nessie-build-publishing = { id = "org.projectnessie.buildsupport.publishing", version.ref = "nessieBuildPlugins" } +nessie-build-reflectionconfig = { id = "org.projectnessie.buildsupport.reflectionconfig", version.ref = "nessieBuildPlugins" } +nessie-build-smallrye-open-api = { id = "org.projectnessie.smallrye-open-api", version.ref = "nessieBuildPlugins" } +nessie-build-spotless = { id = "org.projectnessie.buildsupport.spotless", version.ref = "nessieBuildPlugins" } +nessie-run = { id = "org.projectnessie", version = "0.27.3" } +nexus-publish-plugin = { id = "io.github.gradle-nexus.publish-plugin", version = "1.1.0" } +node-gradle = { id = "com.github.node-gradle.node", version = "3.4.0" } +quarkus = { id = "io.quarkus", version.ref = "quarkus" } +shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadowPlugin" } +spotless = { id = "com.diffplug.spotless", version.ref = "spotlessPlugin" } diff --git a/nessie-iceberg/build.gradle.kts b/nessie-iceberg/build.gradle.kts index 598b47a5a45..2b08d6de194 100644 --- a/nessie-iceberg/build.gradle.kts +++ b/nessie-iceberg/build.gradle.kts @@ -21,21 +21,34 @@ plugins { `nessie-conventions` } -// Pull the extra properties from the "main" Nessie build. This ensures that the same versions -// are being used and we don't need to tweak the dependabot config. -val extraPropertyPattern = - java.util.regex.Pattern.compile("va[lr] (version[A-Z][A-Za-z0-9_]+) = \"([0-9a-zA-Z-.]+)\"") +// To fix circular dependencies with NessieClient, certain projects need to use the same Nessie +// version as Iceberg/Delta has. +// Allow overriding the Iceberg version used by Nessie and the Nessie version used by integration +// tests that depend on Iceberg. +val versionIceberg: String = + System.getProperty("nessie.versionIceberg", libs.versions.iceberg.get()) +val versionClientNessie: String = + System.getProperty("nessie.versionClientNessie", libs.versions.nessieClientVersion.get()) -file("../build.gradle.kts").readLines().forEach { line -> - val lineMatch = extraPropertyPattern.matcher(line) - if (lineMatch.matches()) { - extra[lineMatch.group(1)] = lineMatch.group(2) - } -} - -for (e in loadProperties(file("../clients/spark-scala.properties"))) { - extra[e.key.toString()] = e.value -} +mapOf( + "versionCheckstyle" to libs.versions.checkstyle.get(), + "versionClientNessie" to versionClientNessie, + "versionIceberg" to versionIceberg, + "versionErrorProneCore" to libs.versions.errorprone.get(), + "versionErrorProneSlf4j" to libs.versions.errorproneSlf4j.get(), + "versionGoogleJavaFormat" to libs.versions.googleJavaFormat.get(), + "versionJacoco" to libs.versions.jacoco.get(), + "versionJandex" to libs.versions.jandex.get(), + "versionScala-2.12" to libs.scala.library.v212.get().versionConstraint.preferredVersion, + "versionScala-2.13" to libs.scala.library.v213.get().versionConstraint.preferredVersion, + "versionSpark-3.1" to libs.spark.sql.v31.v212.get().versionConstraint.preferredVersion, + "versionSpark-3.2" to libs.spark.sql.v32.v212.get().versionConstraint.preferredVersion, + "versionSpark-3.3" to libs.spark.sql.v33.v212.get().versionConstraint.preferredVersion, + "quarkus.builder-image" to + "quay.io/quarkus/ubi-quarkus-native-image:${libs.versions.quarkusUbiNativeImage.get()}" + ) + .plus(loadProperties(file("../clients/spark-scala.properties"))) + .forEach { (k, v) -> extra[k.toString()] = v } publishingHelper { nessieRepoName.set("nessie") diff --git a/nessie-iceberg/settings.gradle.kts b/nessie-iceberg/settings.gradle.kts index f47dec3c5f8..4ccb08f00d4 100644 --- a/nessie-iceberg/settings.gradle.kts +++ b/nessie-iceberg/settings.gradle.kts @@ -23,15 +23,6 @@ if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) { val baseVersion = file("../version.txt").readText().trim() pluginManagement { - // Cannot use a settings-script global variable/value, so pass the 'versions' Properties via - // settings.extra around. - val versions = java.util.Properties() - val pluginIdPattern = - java.util.regex.Pattern.compile("\\s*id\\(\"([^\"]+)\"\\) version \"([^\"]+)\"\\s*") - settings.extra["nessieBuild.versions"] = versions - - versions["versionNessie"] = file("../version.txt").readText().trim() - repositories { mavenCentral() // prefer Maven Central, in case Gradle's repo has issues gradlePluginPortal() @@ -39,66 +30,6 @@ pluginManagement { mavenLocal() } } - - val versionErrorPronePlugin = "2.0.2" - val versionIdeaExtPlugin = "1.1.6" - val versionJandexPlugin = "1.82" - val versionNessiePlugins = "0.2.12" - val versionQuarkus = "2.12.3.Final" - val versionShadowPlugin = "7.1.2" - val versionSpotlessPlugin = "6.11.0" - - plugins { - id("com.diffplug.spotless") version versionSpotlessPlugin - id("com.github.johnrengelman.plugin-shadow") version versionShadowPlugin - id("com.github.node-gradle.node") version "3.4.0" - id("com.github.vlsi.jandex") version versionJandexPlugin - id("io.gatling.gradle") version "3.8.4" - id("io.github.gradle-nexus.publish-plugin") version "1.1.0" - id("io.quarkus") version versionQuarkus - id("me.champeau.jmh") version "0.6.7" - id("net.ltgt.errorprone") version versionErrorPronePlugin - id("org.jetbrains.gradle.plugin.idea-ext") version versionIdeaExtPlugin - id("org.projectnessie") version "0.27.3" - id("org.projectnessie.buildsupport.spotless") version versionNessiePlugins - id("org.projectnessie.buildsupport.checkstyle") version versionNessiePlugins - id("org.projectnessie.buildsupport.errorprone") version versionNessiePlugins - id("org.projectnessie.buildsupport.ide-integration") version versionNessiePlugins - id("org.projectnessie.buildsupport.jacoco") version versionNessiePlugins - id("org.projectnessie.buildsupport.jacoco-aggregator") version versionNessiePlugins - id("org.projectnessie.buildsupport.jandex") version versionNessiePlugins - id("org.projectnessie.buildsupport.protobuf") version versionNessiePlugins - id("org.projectnessie.buildsupport.publishing") version versionNessiePlugins - id("org.projectnessie.buildsupport.reflectionconfig") version versionNessiePlugins - id("org.projectnessie.smallrye-open-api") version versionNessiePlugins - - versions["versionQuarkus"] = versionQuarkus - versions["versionErrorPronePlugin"] = versionErrorPronePlugin - versions["versionIdeaExtPlugin"] = versionIdeaExtPlugin - versions["versionSpotlessPlugin"] = versionSpotlessPlugin - versions["versionJandexPlugin"] = versionJandexPlugin - versions["versionShadowPlugin"] = versionShadowPlugin - versions["versionNessieBuildPlugins"] = versionNessiePlugins - - // The project's settings.gradle.kts is "executed" before buildSrc's settings.gradle.kts and - // build.gradle.kts. - // - // Plugin and important dependency versions are defined here and shared with buildSrc via - // a properties file, and via an 'extra' property with all other modules of the Nessie build. - // - // This approach works fine with GitHub's dependabot as well - val nessieBuildVersionsFile = file("build/nessieBuild/versions.properties") - nessieBuildVersionsFile.parentFile.mkdirs() - nessieBuildVersionsFile.outputStream().use { - versions.store(it, "Nessie Build versions from settings.gradle.kts - DO NOT MODIFY!") - } - } -} - -gradle.rootProject { - val prj = this - val versions = settings.extra["nessieBuild.versions"] as Properties - versions.forEach { k, v -> prj.extra[k.toString()] = v } } gradle.beforeProject { diff --git a/settings.gradle.kts b/settings.gradle.kts index 6c8f7f0af64..9a05ad5cba0 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -23,11 +23,6 @@ if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11)) { val baseVersion = file("version.txt").readText().trim() pluginManagement { - // Cannot use a settings-script global variable/value, so pass the 'versions' Properties via - // settings.extra around. - val versions = java.util.Properties() - settings.extra["nessieBuild.versions"] = versions - repositories { mavenCentral() // prefer Maven Central, in case Gradle's repo has issues gradlePluginPortal() @@ -35,66 +30,6 @@ pluginManagement { mavenLocal() } } - - val versionErrorPronePlugin = "2.0.2" - val versionIdeaExtPlugin = "1.1.6" - val versionJandexPlugin = "1.82" - val versionNessieBuildPlugins = "0.2.12" - val versionQuarkus = "2.12.3.Final" - val versionShadowPlugin = "7.1.2" - val versionSpotlessPlugin = "6.11.0" - - plugins { - id("com.diffplug.spotless") version versionSpotlessPlugin - id("com.github.johnrengelman.plugin-shadow") version versionShadowPlugin - id("com.github.node-gradle.node") version "3.4.0" - id("com.github.vlsi.jandex") version versionJandexPlugin - id("io.gatling.gradle") version "3.8.4" - id("io.github.gradle-nexus.publish-plugin") version "1.1.0" - id("io.quarkus") version versionQuarkus - id("me.champeau.jmh") version "0.6.7" - id("net.ltgt.errorprone") version versionErrorPronePlugin - id("org.jetbrains.gradle.plugin.idea-ext") version versionIdeaExtPlugin - id("org.projectnessie") version "0.27.3" - id("org.projectnessie.buildsupport.spotless") version versionNessieBuildPlugins - id("org.projectnessie.buildsupport.checkstyle") version versionNessieBuildPlugins - id("org.projectnessie.buildsupport.errorprone") version versionNessieBuildPlugins - id("org.projectnessie.buildsupport.ide-integration") version versionNessieBuildPlugins - id("org.projectnessie.buildsupport.jacoco") version versionNessieBuildPlugins - id("org.projectnessie.buildsupport.jacoco-aggregator") version versionNessieBuildPlugins - id("org.projectnessie.buildsupport.jandex") version versionNessieBuildPlugins - id("org.projectnessie.buildsupport.protobuf") version versionNessieBuildPlugins - id("org.projectnessie.buildsupport.publishing") version versionNessieBuildPlugins - id("org.projectnessie.buildsupport.reflectionconfig") version versionNessieBuildPlugins - id("org.projectnessie.smallrye-open-api") version versionNessieBuildPlugins - - versions["versionQuarkus"] = versionQuarkus - versions["versionErrorPronePlugin"] = versionErrorPronePlugin - versions["versionIdeaExtPlugin"] = versionIdeaExtPlugin - versions["versionSpotlessPlugin"] = versionSpotlessPlugin - versions["versionJandexPlugin"] = versionJandexPlugin - versions["versionShadowPlugin"] = versionShadowPlugin - versions["versionNessieBuildPlugins"] = versionNessieBuildPlugins - - // The project's settings.gradle.kts is "executed" before buildSrc's settings.gradle.kts and - // build.gradle.kts. - // - // Plugin and important dependency versions are defined here and shared with buildSrc via - // a properties file, and via an 'extra' property with all other modules of the Nessie build. - // - // This approach works fine with GitHub's dependabot as well - val nessieBuildVersionsFile = file("build/nessieBuild/versions.properties") - nessieBuildVersionsFile.parentFile.mkdirs() - nessieBuildVersionsFile.outputStream().use { - versions.store(it, "Nessie Build versions from settings.gradle.kts - DO NOT MODIFY!") - } - } -} - -gradle.rootProject { - val prj = this - val versions = settings.extra["nessieBuild.versions"] as Properties - versions.forEach { k, v -> prj.extra[k.toString()] = v } } gradle.beforeProject { @@ -102,17 +37,7 @@ gradle.beforeProject { group = "org.projectnessie" } -listOf( - "code-coverage", - "nessie-deps-antlr", - "nessie-deps-build-only", - "nessie-deps-iceberg", - "nessie-deps-managed-only", - "nessie-deps-persist", - "nessie-deps-quarkus", - "nessie-deps-testing" - ) - .forEach { include(it) } +include("code-coverage") fun nessieProject(name: String, directory: File): ProjectDescriptor { include(name)