Skip to content

Commit

Permalink
Build/internal/NesQuEIT: enforce no colon : for nessieProject() (#…
Browse files Browse the repository at this point in the history
…9842)

... otherwise leads to invalid `:buildName::moduleName` Gradle project references.
  • Loading branch information
snazy authored Oct 30, 2024
1 parent 1a1ae4f commit 3ec9513
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions build-logic/src/main/kotlin/Utilities.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion integrations/spark-extensions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down

0 comments on commit 3ec9513

Please sign in to comment.