From 01f9277c8097a08b697527cca1ee4b4a8a708a72 Mon Sep 17 00:00:00 2001 From: Ross Lawley Date: Wed, 16 Oct 2024 10:06:04 +0100 Subject: [PATCH 1/2] Fix pom scope for Scala projects Required the `api` dependency method from the `java-library` plugin. Now the scope is `compile` instead of runtime. JAVA-5647 --- bson-scala/build.gradle | 2 +- build.gradle | 1 + driver-scala/build.gradle | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bson-scala/build.gradle b/bson-scala/build.gradle index 6606dec5a89..5d21ed521b5 100644 --- a/bson-scala/build.gradle +++ b/bson-scala/build.gradle @@ -18,7 +18,7 @@ description = "A Scala wrapper / extension to the bson library" archivesBaseName = 'mongo-scala-bson' dependencies { - implementation project(path: ':bson', configuration: 'default') + api project(path: ':bson', configuration: 'default') } sourceSets { diff --git a/build.gradle b/build.gradle index a45de80f347..59b8960481d 100644 --- a/build.gradle +++ b/build.gradle @@ -109,6 +109,7 @@ configure(javaProjects) { configure(scalaProjects) { apply plugin: 'scala' + apply plugin: 'java-library' apply plugin: 'idea' apply plugin: "com.adtran.scala-multiversion-plugin" apply plugin: "com.diffplug.spotless" diff --git a/driver-scala/build.gradle b/driver-scala/build.gradle index 4490ed39538..e9e9e15040e 100644 --- a/driver-scala/build.gradle +++ b/driver-scala/build.gradle @@ -19,8 +19,8 @@ archivesBaseName = 'mongo-scala-driver' dependencies { - implementation project(path: ':bson-scala', configuration: 'default') - implementation project(path: ':driver-reactive-streams', configuration: 'default') + api project(path: ':bson-scala', configuration: 'default') + api project(path: ':driver-reactive-streams', configuration: 'default') compileOnly 'com.google.code.findbugs:jsr305:1.3.9' testImplementation project(':driver-sync') From bcd4bb0262c396cf1e4a95e087fdf03c0faa077a Mon Sep 17 00:00:00 2001 From: Ross Lawley Date: Thu, 17 Oct 2024 13:56:27 +0100 Subject: [PATCH 2/2] Make the scala libraries compile scope as well --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 59b8960481d..88295f763be 100644 --- a/build.gradle +++ b/build.gradle @@ -117,8 +117,8 @@ configure(scalaProjects) { group = 'org.mongodb.scala' dependencies { - implementation ('org.scala-lang:scala-library:%scala-version%') - implementation ('org.scala-lang:scala-reflect:%scala-version%') + api ('org.scala-lang:scala-library:%scala-version%') + api ('org.scala-lang:scala-reflect:%scala-version%') testImplementation(platform("org.junit:junit-bom:$junitBomVersion")) testImplementation("org.junit.vintage:junit-vintage-engine")