1414 * limitations under the License.
1515 */
1616
17- apply plugin : ' eclipse'
18- apply plugin : ' idea'
19-
20- buildscript {
21- repositories {
22- mavenLocal()
23- mavenCentral()
24- maven { url " https://plugins.gradle.org/m2/" }
25- }
26- dependencies {
27- classpath ' com.netflix.nebula:gradle-extra-configurations-plugin:7.0.0'
28- classpath " com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.15"
29- classpath ' biz.aQute.bnd:biz.aQute.bnd.gradle:5.1.2'
30-
31- // Scala plugins
32- classpath " com.adtran:scala-multiversion-plugin:2.0.4"
33- classpath " com.diffplug.spotless:spotless-plugin-gradle:6.14.0"
34-
35- // kotlin plugins
36- classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10"
37- classpath " org.jetbrains.kotlin:kotlin-serialization:1.8.10"
38- classpath " org.jetbrains.dokka:dokka-gradle-plugin:1.8.10"
39- classpath " io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.21.0"
40-
41- // Test logging plugin
42- classpath ' com.adarshr:gradle-test-logger-plugin:2.1.0'
43- }
17+ plugins {
18+ id(" eclipse" )
19+ id(" idea" )
20+
21+ alias(libs. plugins. bnd) apply false
22+ alias(libs. plugins. detekt) apply false
23+ alias(libs. plugins. dokka) apply false
24+ alias(libs. plugins. download) apply false
25+ alias(libs. plugins. kotlin) apply false
26+ alias(libs. plugins. kotlin. serialization) apply false
27+ alias(libs. plugins. optional) apply false
28+ alias(libs. plugins. scala. multiversion) apply false
29+ alias(libs. plugins. spotbugs) apply false
30+ alias(libs. plugins. spotless) apply false
31+ alias(libs. plugins. test. logger) apply false
4432}
4533
4634// ////////////////////////////////////////
@@ -49,17 +37,6 @@ buildscript {
4937
5038ext {
5139 configDir = new File (rootDir, ' config' )
52- jnrUnixsocketVersion = ' 0.38.17'
53- nettyVersion = ' 4.1.87.Final'
54- snappyVersion = ' 1.1.10.3'
55- zstdVersion = ' 1.5.5-3'
56- awsSdkV2Version = ' 2.18.9'
57- awsSdkV1Version = ' 1.12.337'
58- projectReactorVersion = ' 2022.0.0'
59- junitBomVersion = ' 5.10.2'
60- logbackVersion = ' 1.3.14'
61- graalSdkVersion = ' 24.0.0'
62- reflectionsVersion = ' 0.9.10'
6340 gitVersion = getGitVersion()
6441}
6542
@@ -109,27 +86,21 @@ configure(javaProjects) {
10986}
11087
11188configure(scalaProjects) {
112- apply plugin : ' scala'
113- apply plugin : ' java-library'
114- apply plugin : ' idea'
89+ apply plugin : " java-library"
90+ apply plugin : " scala"
11591 apply plugin : " com.adtran.scala-multiversion-plugin"
11692 apply plugin : " com.diffplug.spotless"
11793
11894 group = ' org.mongodb.scala'
11995
12096 dependencies {
121- api (' org.scala-lang:scala-library:%scala-version%' )
122- api (' org.scala-lang:scala-reflect:%scala-version%' )
123-
124- testImplementation(platform(" org.junit:junit-bom:$junitBomVersion " ))
125- testImplementation(" org.junit.vintage:junit-vintage-engine" )
126-
127- testImplementation(' org.scalatest:scalatest-flatspec_%%:3.2.9' )
128- testImplementation(' org.scalatest:scalatest-shouldmatchers_%%:3.2.9' )
129- testImplementation(' org.scalatestplus:junit-4-13_%%:3.2.9.0' )
130- testImplementation(' org.scalatestplus:mockito-3-12_%%:3.2.10.0' )
131- testImplementation(" ch.qos.logback:logback-classic:$logbackVersion " )
132- testImplementation(" org.reflections:reflections:$reflectionsVersion " )
97+ api(libs. scala. library)
98+ api(libs. scala. reflect)
99+
100+ testImplementation(platform(libs. junit. bom))
101+ testImplementation(libs. bundles. junit. vintage)
102+ testImplementation(libs. bundles. scalatest)
103+ testImplementation(libs. reflections)
133104 }
134105
135106 test{
@@ -177,12 +148,12 @@ configure(javaMainProjects) {
177148 apply plugin : ' java-library'
178149
179150 dependencies {
180- compileOnly ' com.google.code.findbugs:jsr305:1.3.9'
181- api ' org.slf4j:slf4j-api:1.7.6' , optional
182- testImplementation ' com.google.code.findbugs:jsr305:1.3.9'
151+ compileOnly(libs. findbugs. jsr)
152+ api(libs. slf4j, optional)
183153
154+ testImplementation(libs. findbugs. jsr)
184155 // https://issues.apache.org/jira/browse/GROOVY-10194
185- testImplementation ' org.codehaus. groovy:groovy-all:3.0.9 '
156+ testImplementation(libs . groovy)
186157 }
187158
188159 /* Compiling */
@@ -251,25 +222,19 @@ configure(javaCodeCheckedProjects) {
251222 apply plugin : ' com.adarshr.test-logger'
252223
253224 dependencies {
254- testImplementation(platform(" org.junit:junit-bom:$junitBomVersion " ))
255- testImplementation(' org.junit.jupiter:junit-jupiter' )
256- testImplementation(' org.junit.jupiter:junit-jupiter-params' )
257- testImplementation(' org.junit.jupiter:junit-jupiter-engine' )
258- testImplementation(' org.junit.vintage:junit-vintage-engine' )
259-
260- testImplementation platform(' org.spockframework:spock-bom:2.1-groovy-3.0' )
261- testImplementation ' org.spockframework:spock-core'
262- testImplementation ' org.spockframework:spock-junit4'
225+ testImplementation(platform(libs. junit. bom))
226+ testImplementation(libs. bundles. junit. vintage)
227+
228+ testImplementation(platform(libs. spock. bom))
229+ testImplementation(libs. bundles. spock)
230+
263231 if (' 8' . equals(findProperty(" javaVersion" ))) {
264- testImplementation(" org.mockito:mockito-core:4.6.1" )
265- testImplementation(" org.mockito:mockito-inline:4.6.1" )
232+ testImplementation(libs. bundles. mockito. java8)
266233 } else {
267- testImplementation(" org.mockito:mockito-core:5.11.0 " )
234+ testImplementation(libs . bundles . mockito )
268235 }
269- testImplementation ' cglib:cglib-nodep:2.2.2'
270- testImplementation ' org.objenesis:objenesis:1.3'
271- testImplementation ' org.hamcrest:hamcrest-all:1.3'
272- testImplementation " ch.qos.logback:logback-classic:$logbackVersion "
236+ testImplementation(libs. cglib)
237+ testImplementation(libs. objenesis)
273238 testImplementation project(' :util:spock' ) // Adding categories to classpath
274239 }
275240
0 commit comments