From 3ec95130ed0d221354e0d8b916982a50fe478833 Mon Sep 17 00:00:00 2001 From: Robert Stupp Date: Wed, 30 Oct 2024 11:25:40 +0100 Subject: [PATCH] Build/internal/NesQuEIT: enforce no colon `:` for `nessieProject()` (#9842) ... otherwise leads to invalid `:buildName::moduleName` Gradle project references. --- build-logic/src/main/kotlin/Utilities.kt | 3 +++ integrations/spark-extensions/build.gradle.kts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build-logic/src/main/kotlin/Utilities.kt b/build-logic/src/main/kotlin/Utilities.kt index ca2705bab5a..142ce858edd 100644 --- a/build-logic/src/main/kotlin/Utilities.kt +++ b/build-logic/src/main/kotlin/Utilities.kt @@ -195,6 +195,9 @@ fun DependencyHandlerScope.nessieProject( artifactId: String, configuration: String? = null ): ModuleDependency { + if (artifactId.startsWith(":")) { + throw IllegalArgumentException("artifactId for nessieProject() must not start with ':'") + } return if (!isIncludedInNesQuEIT(project(":").dependencyProject.gradle)) { project(":$artifactId", configuration) } else { diff --git a/integrations/spark-extensions/build.gradle.kts b/integrations/spark-extensions/build.gradle.kts index cb05f7b1c60..dd598576b95 100644 --- a/integrations/spark-extensions/build.gradle.kts +++ b/integrations/spark-extensions/build.gradle.kts @@ -30,7 +30,7 @@ dependencies { // picks the right dependencies for scala compilation forScala(sparkScala.scalaVersion) - implementation(nessieProject(":nessie-cli-grammar")) + implementation(nessieProject("nessie-cli-grammar")) implementation(project(":nessie-spark-extensions-base_${sparkScala.scalaMajorVersion}")) compileOnly("org.apache.spark:spark-sql_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) } compileOnly("org.apache.spark:spark-core_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) }