Skip to content

Revert "Gradle updated to use version catalogs" #1624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions bson-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -18,12 +18,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("org.jetbrains.kotlin.jvm")
id("java-library")
`java-library`

// Test based plugins
alias(libs.plugins.spotless)
alias(libs.plugins.dokka)
alias(libs.plugins.detekt)
id("com.diffplug.spotless")
id("org.jetbrains.dokka")
id("io.gitlab.arturbosch.detekt")
}

repositories {
@@ -39,13 +39,13 @@ ext.set("pomName", "Bson Kotlin")

dependencies {
// Align versions of all Kotlin components
implementation(platform(libs.kotlin.bom))
implementation(libs.kotlin.stdlib.jdk8)
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

api(project(path = ":bson", configuration = "default"))
implementation(libs.kotlin.reflect)
implementation("org.jetbrains.kotlin:kotlin-reflect")

testImplementation(libs.junit.kotlin)
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
testImplementation(project(path = ":driver-core", configuration = "default"))
}

32 changes: 18 additions & 14 deletions bson-kotlinx/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -19,12 +19,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.jetbrains.kotlin.jvm")
kotlin("plugin.serialization")
id("java-library")
`java-library`

// Test based plugins
alias(libs.plugins.spotless)
alias(libs.plugins.dokka)
alias(libs.plugins.detekt)
id("com.diffplug.spotless")
id("org.jetbrains.dokka")
id("io.gitlab.arturbosch.detekt")
}

repositories {
@@ -38,28 +38,32 @@ description = "Bson Kotlinx Codecs"

ext.set("pomName", "Bson Kotlinx")

ext.set("kotlinxDatetimeVersion", "0.4.0")

val kotlinxDatetimeVersion: String by ext

java {
registerFeature("dateTimeSupport") { usingSourceSet(sourceSets["main"]) }
registerFeature("jsonSupport") { usingSourceSet(sourceSets["main"]) }
}

dependencies {
// Align versions of all Kotlin components
implementation(platform(libs.kotlin.bom))
implementation(libs.kotlin.stdlib.jdk8)
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

implementation(platform(libs.kotlinx.serialization))
implementation(libs.kotlinx.serialization.core)
"dateTimeSupportImplementation"(libs.kotlinx.serialization.datetime)
"jsonSupportImplementation"(libs.kotlinx.serialization.json)
implementation(platform("org.jetbrains.kotlinx:kotlinx-serialization-bom:1.5.0"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core")
"dateTimeSupportImplementation"("org.jetbrains.kotlinx:kotlinx-datetime:$kotlinxDatetimeVersion")
"jsonSupportImplementation"("org.jetbrains.kotlinx:kotlinx-serialization-json")

api(project(path = ":bson", configuration = "default"))
implementation(libs.kotlin.reflect)
implementation("org.jetbrains.kotlin:kotlin-reflect")

testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
testImplementation(project(path = ":driver-core", configuration = "default"))
testImplementation(libs.junit.kotlin)
testImplementation(libs.kotlinx.serialization.datetime)
testImplementation(libs.kotlinx.serialization.json)
testImplementation("org.jetbrains.kotlinx:kotlinx-datetime:$kotlinxDatetimeVersion")
testImplementation("org.jetbrains.kotlinx:kotlinx-serialization-json")
}

kotlin { explicitApi() }
111 changes: 73 additions & 38 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -14,21 +14,33 @@
* limitations under the License.
*/

plugins {
id("eclipse")
id("idea")

alias(libs.plugins.bnd) apply false
alias(libs.plugins.detekt) apply false
alias(libs.plugins.dokka) apply false
alias(libs.plugins.download) apply false
alias(libs.plugins.kotlin) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.optional) apply false
alias(libs.plugins.scala.multiversion) apply false
alias(libs.plugins.spotbugs) apply false
alias(libs.plugins.spotless) apply false
alias(libs.plugins.test.logger) apply false
apply plugin: 'eclipse'
apply plugin: 'idea'

buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:7.0.0'
classpath "com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.15"
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:5.1.2'

// Scala plugins
classpath "com.adtran:scala-multiversion-plugin:2.0.4"
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.14.0"

// kotlin plugins
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10"
classpath "org.jetbrains.kotlin:kotlin-serialization:1.8.10"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.8.10"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.21.0"

// Test logging plugin
classpath 'com.adarshr:gradle-test-logger-plugin:2.1.0'
}
}

//////////////////////////////////////////
@@ -37,6 +49,17 @@ plugins {

ext {
configDir = new File(rootDir, 'config')
jnrUnixsocketVersion = '0.38.17'
nettyVersion = '4.1.87.Final'
snappyVersion = '1.1.10.3'
zstdVersion = '1.5.5-3'
awsSdkV2Version = '2.18.9'
awsSdkV1Version = '1.12.337'
projectReactorVersion = '2022.0.0'
junitBomVersion = '5.10.2'
logbackVersion = '1.3.14'
graalSdkVersion = '24.0.0'
reflectionsVersion = '0.9.10'
gitVersion = getGitVersion()
}

@@ -86,21 +109,27 @@ configure(javaProjects) {
}

configure(scalaProjects) {
apply plugin: "java-library"
apply plugin: "scala"
apply plugin: 'scala'
apply plugin: 'java-library'
apply plugin: 'idea'
apply plugin: "com.adtran.scala-multiversion-plugin"
apply plugin: "com.diffplug.spotless"

group = 'org.mongodb.scala'

dependencies {
api(libs.scala.library)
api(libs.scala.reflect)

testImplementation(platform(libs.junit.bom))
testImplementation(libs.bundles.junit.vintage)
testImplementation(libs.bundles.scalatest)
testImplementation(libs.reflections)
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")

testImplementation('org.scalatest:scalatest-flatspec_%%:3.2.9')
testImplementation('org.scalatest:scalatest-shouldmatchers_%%:3.2.9')
testImplementation('org.scalatestplus:junit-4-13_%%:3.2.9.0')
testImplementation('org.scalatestplus:mockito-3-12_%%:3.2.10.0')
testImplementation("ch.qos.logback:logback-classic:$logbackVersion")
testImplementation("org.reflections:reflections:$reflectionsVersion")
}

test{
@@ -148,12 +177,12 @@ configure(javaMainProjects) {
apply plugin: 'java-library'

dependencies {
compileOnly(libs.findbugs.jsr)
api(libs.slf4j, optional)
compileOnly 'com.google.code.findbugs:jsr305:1.3.9'
api 'org.slf4j:slf4j-api:1.7.6', optional
testImplementation 'com.google.code.findbugs:jsr305:1.3.9'

testImplementation(libs.findbugs.jsr)
// https://issues.apache.org/jira/browse/GROOVY-10194
testImplementation(libs.groovy)
testImplementation 'org.codehaus.groovy:groovy-all:3.0.9'
}

/* Compiling */
@@ -222,19 +251,25 @@ configure(javaCodeCheckedProjects) {
apply plugin: 'com.adarshr.test-logger'

dependencies {
testImplementation(platform(libs.junit.bom))
testImplementation(libs.bundles.junit.vintage)

testImplementation(platform(libs.spock.bom))
testImplementation(libs.bundles.spock)

testImplementation(platform("org.junit:junit-bom:$junitBomVersion"))
testImplementation('org.junit.jupiter:junit-jupiter')
testImplementation('org.junit.jupiter:junit-jupiter-params')
testImplementation('org.junit.jupiter:junit-jupiter-engine')
testImplementation('org.junit.vintage:junit-vintage-engine')

testImplementation platform('org.spockframework:spock-bom:2.1-groovy-3.0')
testImplementation 'org.spockframework:spock-core'
testImplementation 'org.spockframework:spock-junit4'
if ('8'.equals(findProperty("javaVersion"))) {
testImplementation(libs.bundles.mockito.java8)
testImplementation("org.mockito:mockito-core:4.6.1")
testImplementation("org.mockito:mockito-inline:4.6.1")
} else {
testImplementation(libs.bundles.mockito)
testImplementation("org.mockito:mockito-core:5.11.0")
}
testImplementation(libs.cglib)
testImplementation(libs.objenesis)
testImplementation 'cglib:cglib-nodep:2.2.2'
testImplementation 'org.objenesis:objenesis:1.3'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation "ch.qos.logback:logback-classic:$logbackVersion"
testImplementation project(':util:spock') //Adding categories to classpath
}

2 changes: 1 addition & 1 deletion driver-benchmarks/build.gradle
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ sourceSets {
dependencies {
api project(':driver-sync')
api project(':mongodb-crypt')
implementation(libs.logback.classic)
implementation "ch.qos.logback:logback-classic:$logbackVersion"
}

javadoc {
37 changes: 21 additions & 16 deletions driver-core/build.gradle
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@


plugins {
alias(libs.plugins.build.config)
id 'com.github.gmazzo.buildconfig' version '3.0.3'
}

archivesBaseName = 'mongodb-driver-core'
@@ -33,33 +33,38 @@ configurations {
}
}

def classifiers = ["linux-x86_64", "linux-aarch_64", "osx-x86_64", "osx-aarch_64", "windows-x86_64"]
dependencies {
api project(path: ':bson', configuration: 'default')
implementation project(path: ':bson-record-codec', configuration: 'default')
implementation project(path: ':bson-kotlin', configuration: 'default'), optional
implementation project(path: ':bson-kotlinx', configuration: 'default'), optional
implementation project(path: ':mongodb-crypt', configuration: 'default'), optional

implementation(libs.jnr.unixsocket, optional)
api(platform(libs.netty.bom), optional)
api(libs.bundles.netty, optional)
compileOnly(libs.graal.sdk)
implementation "com.github.jnr:jnr-unixsocket:$jnrUnixsocketVersion", optional
api platform("io.netty:netty-bom:$nettyVersion")
api "io.netty:netty-buffer", optional
api "io.netty:netty-transport", optional
api "io.netty:netty-handler", optional
compileOnly "org.graalvm.sdk:graal-sdk:$graalSdkVersion"

// Optionally depend on both AWS SDK v2 and v1.
// The driver will use v2 is present, v1 if present, or built-in functionality if neither are present
implementation(libs.bundles.aws.java.sdk.v1, optional)
implementation(libs.bundles.aws.java.sdk.v2, optional)
// Optionally depend on both AWS SDK v2 and v1. The driver will use v2 is present, v1 if present, or built-in functionality if
// neither are present
implementation "software.amazon.awssdk:auth:$awsSdkV2Version", optional
implementation "software.amazon.awssdk:sts:$awsSdkV2Version", optional
implementation "com.amazonaws:aws-java-sdk-core:$awsSdkV1Version", optional
implementation "com.amazonaws:aws-java-sdk-sts:$awsSdkV1Version", optional

implementation(libs.snappy.java, optional)
implementation(libs.zstd.jni, optional)
implementation "org.xerial.snappy:snappy-java:$snappyVersion", optional
implementation "com.github.luben:zstd-jni:$zstdVersion", optional

testImplementation project(':bson').sourceSets.test.output
testImplementation(libs.bundles.junit)
testImplementation(libs.reflections)
testImplementation('org.junit.jupiter:junit-jupiter-api')
testImplementation("org.reflections:reflections:$reflectionsVersion")
testRuntimeOnly "io.netty:netty-tcnative-boringssl-static"

testRuntimeOnly(libs.netty.boringssl)
["linux-x86_64", "linux-aarch_64", "osx-x86_64", "osx-aarch_64", "windows-x86_64"].each { arch ->
testRuntimeOnly(variantOf(libs.netty.boringssl) { classifier(arch) })
classifiers.forEach {
testRuntimeOnly "io.netty:netty-tcnative-boringssl-static::$it"
}
}

33 changes: 17 additions & 16 deletions driver-kotlin-coroutine/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -18,12 +18,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("org.jetbrains.kotlin.jvm")
id("java-library")
`java-library`

// Test based plugins
alias(libs.plugins.spotless)
alias(libs.plugins.dokka)
alias(libs.plugins.detekt)
id("com.diffplug.spotless")
id("org.jetbrains.dokka")
id("io.gitlab.arturbosch.detekt")
}

repositories {
@@ -56,25 +56,26 @@ val integrationTestImplementation: Configuration by

dependencies {
// Align versions of all Kotlin components
implementation(platform(libs.kotlin.bom))
implementation(libs.kotlin.stdlib.jdk8)
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

implementation(platform(libs.kotlinx.coroutines.bom))
api(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.coroutines.reactive)
implementation(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4"))
api("org.jetbrains.kotlinx:kotlinx-coroutines-core")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactive")

api(project(path = ":bson", configuration = "default"))
api(project(path = ":driver-reactive-streams", configuration = "default"))
implementation(project(path = ":bson-kotlin", configuration = "default"))

testImplementation(libs.kotlin.reflect)
testImplementation(libs.junit.kotlin)
testImplementation(libs.bundles.mockito.kotlin)
testImplementation(libs.assertj)
testImplementation(libs.classgraph)
testImplementation("org.jetbrains.kotlin:kotlin-reflect")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
testImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0")
testImplementation("org.mockito:mockito-junit-jupiter:4.11.0")
testImplementation("org.assertj:assertj-core:3.24.2")
testImplementation("io.github.classgraph:classgraph:4.8.154")

integrationTestImplementation(libs.junit.kotlin)
integrationTestImplementation(libs.kotlinx.coroutines.test)
integrationTestImplementation("org.jetbrains.kotlin:kotlin-test-junit")
integrationTestImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test")
integrationTestImplementation(project(path = ":driver-sync"))
integrationTestImplementation(project(path = ":driver-core"))
integrationTestImplementation(project(path = ":bson"))
22 changes: 11 additions & 11 deletions driver-kotlin-extensions/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -18,12 +18,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("org.jetbrains.kotlin.jvm")
id("java-library")
`java-library`

// Test based plugins
alias(libs.plugins.spotless)
alias(libs.plugins.dokka)
alias(libs.plugins.detekt)
id("com.diffplug.spotless")
id("org.jetbrains.dokka")
id("io.gitlab.arturbosch.detekt")
}

repositories {
@@ -41,8 +41,8 @@ java { registerFeature("kotlinDrivers") { usingSourceSet(sourceSets["main"]) } }

dependencies {
// Align versions of all Kotlin components
implementation(platform(libs.kotlin.bom))
implementation(libs.kotlin.stdlib.jdk8)
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

api(project(path = ":driver-core", configuration = "default"))

@@ -51,11 +51,11 @@ dependencies {
"kotlinDriversImplementation"(project(path = ":driver-kotlin-sync", configuration = "default"))
"kotlinDriversImplementation"(project(path = ":driver-kotlin-coroutine", configuration = "default"))

testImplementation(libs.kotlin.reflect)
testImplementation(libs.junit.kotlin)
testImplementation(libs.bundles.mockito.kotlin)
testImplementation(libs.assertj)
testImplementation(libs.classgraph)
testImplementation("org.jetbrains.kotlin:kotlin-reflect")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
testImplementation("org.assertj:assertj-core:3.24.2")
testImplementation("io.github.classgraph:classgraph:4.8.154")
testImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0")
}

kotlin { explicitApi() }
25 changes: 13 additions & 12 deletions driver-kotlin-sync/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -18,12 +18,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("org.jetbrains.kotlin.jvm")
id("java-library")
`java-library`

// Test based plugins
alias(libs.plugins.spotless)
alias(libs.plugins.dokka)
alias(libs.plugins.detekt)
id("com.diffplug.spotless")
id("org.jetbrains.dokka")
id("io.gitlab.arturbosch.detekt")
}

repositories {
@@ -56,20 +56,21 @@ val integrationTestImplementation: Configuration by

dependencies {
// Align versions of all Kotlin components
implementation(platform(libs.kotlin.bom))
implementation(libs.kotlin.stdlib.jdk8)
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

api(project(path = ":bson", configuration = "default"))
api(project(path = ":driver-sync", configuration = "default"))
implementation(project(path = ":bson-kotlin", configuration = "default"))

testImplementation(libs.kotlin.reflect)
testImplementation(libs.junit.kotlin)
testImplementation(libs.bundles.mockito.kotlin)
testImplementation(libs.assertj)
testImplementation(libs.classgraph)
testImplementation("org.jetbrains.kotlin:kotlin-reflect")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
testImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0")
testImplementation("org.mockito:mockito-junit-jupiter:4.11.0")
testImplementation("org.assertj:assertj-core:3.24.2")
testImplementation("io.github.classgraph:classgraph:4.8.154")

integrationTestImplementation(libs.junit.kotlin)
integrationTestImplementation("org.jetbrains.kotlin:kotlin-test-junit")
integrationTestImplementation(project(path = ":driver-sync"))
integrationTestImplementation(project(path = ":driver-core"))
}
22 changes: 16 additions & 6 deletions driver-lambda/build.gradle
Original file line number Diff line number Diff line change
@@ -14,13 +14,23 @@
* limitations under the License.
*/

buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
}
}

plugins {
id("java")
id("application")
alias(libs.plugins.shadow)
}

apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'

compileJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
@@ -43,10 +53,10 @@ dependencies {
implementation project(':driver-sync')
implementation project(':bson')

implementation(libs.aws.lambda.core)
implementation(libs.aws.lambda.events)
implementation(platform(libs.junit.bom))
implementation(libs.bundles.junit)
implementation('com.amazonaws:aws-lambda-java-core:1.2.2')
implementation('com.amazonaws:aws-lambda-java-events:3.11.1')
implementation(platform("org.junit:junit-bom:$junitBomVersion"))
implementation('org.junit.jupiter:junit-jupiter-api')
}


15 changes: 7 additions & 8 deletions driver-reactive-streams/build.gradle
Original file line number Diff line number Diff line change
@@ -21,21 +21,20 @@ dependencies {
api project(path: ':bson', configuration: 'default')
api project(path: ':driver-core', configuration: 'default')

api(libs.reactive.streams)
implementation(platform(libs.project.reactor.bom))
implementation(libs.project.reactor.core)
api 'org.reactivestreams:reactive-streams:1.0.4'
implementation platform("io.projectreactor:reactor-bom:$projectReactorVersion")
implementation 'io.projectreactor:reactor-core'

testImplementation project(':bson').sourceSets.test.output
testImplementation project(':driver-sync')
testImplementation project(':driver-sync').sourceSets.test.output
testImplementation project(':driver-core').sourceSets.test.output
testImplementation(libs.reactive.streams.tck)

testImplementation(libs.project.reactor.test)
testImplementation 'org.reactivestreams:reactive-streams-tck:1.0.4'
testImplementation 'io.projectreactor:reactor-test'
if ('8'.equals(findProperty("javaVersion"))) {
testImplementation(libs.bundles.mockito.java8)
testImplementation 'org.mockito:mockito-junit-jupiter:4.6.1'
} else {
testImplementation(libs.bundles.mockito)
testImplementation 'org.mockito:mockito-junit-jupiter:5.11.0'
}

testRuntimeOnly project(path: ':driver-core', configuration: 'consumableTestRuntimeOnly')
2 changes: 1 addition & 1 deletion driver-sync/build.gradle
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ dependencies {
testImplementation project(':driver-core').sourceSets.test.output
testRuntimeOnly project(path: ':driver-core', configuration: 'consumableTestRuntimeOnly')

testImplementation(libs.aws.lambda.core)
testImplementation('com.amazonaws:aws-lambda-java-core:1.2.1')
}

sourceSets {
20 changes: 14 additions & 6 deletions driver-workload-executor/build.gradle
Original file line number Diff line number Diff line change
@@ -14,12 +14,18 @@
* limitations under the License.
*/

plugins {
id("java")
id("application")
alias(libs.plugins.shadow)
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
}
}

apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'

mainClassName = "com.mongodb.workload.WorkloadExecutor"

sourceSets {
@@ -37,8 +43,10 @@ dependencies {
implementation project(':driver-sync')
implementation project(':driver-core').sourceSets.test.output
implementation project(':driver-sync').sourceSets.test.output
implementation(platform(libs.junit.bom))
implementation(libs.bundles.junit.vintage)
implementation "ch.qos.logback:logback-classic:$logbackVersion"
implementation(platform("org.junit:junit-bom:$junitBomVersion"))
implementation('org.junit.jupiter:junit-jupiter')
implementation('org.junit.vintage:junit-vintage-engine')
}

javadoc {
15 changes: 7 additions & 8 deletions graalvm-native-image-app/build.gradle
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@
// Note requires a Gradle project flag `-PincludeGraalvm` (see settings.gradle).

plugins {
id("application")
alias(libs.plugins.graalvm.buildtools)
id 'application'
id 'org.graalvm.buildtools.native' version '0.9.23'
}

application {
@@ -113,10 +113,9 @@ dependencies {
implementation project(':driver-sync').sourceSets.test.output
implementation project(':driver-legacy').sourceSets.test.output
implementation project(':driver-reactive-streams').sourceSets.test.output

implementation(libs.slf4j)
implementation(libs.logback)
implementation(platform(libs.reactor.bom))
implementation(libs.reactor.core)
implementation(libs.graal.sdk.native)
implementation 'org.slf4j:slf4j-api:2.0.12'
implementation "ch.qos.logback:logback-classic:$logbackVersion"
implementation platform("io.projectreactor:reactor-bom:$projectReactorVersion")
implementation 'io.projectreactor:reactor-core'
implementation "org.graalvm.sdk:nativeimage:$graalSdkVersion"
}
178 changes: 0 additions & 178 deletions gradle/libs.versions.toml

This file was deleted.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
257 changes: 104 additions & 153 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
#!/usr/bin/env sh

#
# Copyright © 2015-2021 the original authors.
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,101 +17,67 @@
#

##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##
## Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME

# Resolve links: $0 may be a link
app_path=$0

# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
MAX_FD="maximum"

warn () {
echo "$*"
} >&2
}

die () {
echo
echo "$*"
echo
exit 1
} >&2
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -121,9 +87,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD=$JAVA_HOME/bin/java
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -132,103 +98,88 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi

# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )

JAVACMD=$( cygpath --unix "$JAVACMD" )

if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option

if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`

eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

exec "$JAVACMD" "$@"
17 changes: 14 additions & 3 deletions mongodb-crypt/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -17,8 +17,19 @@

import de.undercouch.gradle.tasks.download.Download

buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
"classpath"(group = "net.java.dev.jna", name = "jna", version = "5.11.0")
}
}

plugins {
alias(libs.plugins.download)
// Needed to download libmongocrypt from s3.
id("de.undercouch.download") version "5.6.0"
}

group = "org.mongodb"
@@ -33,10 +44,10 @@ java {

dependencies {
api(project(path = ":bson", configuration = "default"))
api(libs.jna)
api("net.java.dev.jna:jna:5.11.0")

// Tests
testImplementation(libs.bundles.junit)
testImplementation("org.junit.jupiter:junit-jupiter")
}

/*