From c6d392d5d3452dbbcdd162c381206050cd9ab2f4 Mon Sep 17 00:00:00 2001 From: mballard-mdb Date: Thu, 5 Jun 2025 12:01:46 -0400 Subject: [PATCH] Docsp-49013 (#226) * DOCSP-49013: Added tips to redirect to installation to use BOM for better version management where kotlin extensions used in java/kotlin docs. * DOCSP-49013: Added tips to redirect to installation to use BOM for better version management where kotlin extensions used in java/kotlin docs. * DOCSP-49013: Fixing link. * DOCSP-49013: Includes attempt, link still broken * DOCSP-49013-Relocating BOM Tip on Serialization page * DOCSP-49013-fixing link * DOCSP-49013-fixing serialization * DOCSP-49013-actual installation page for link * DOCSP-49013-reverted link * DOCSP-49013-shared update * DOCSP-49013-update shared file name * DOCSP-49013-edits, removed versions from implementations and maven instr, better clarity in link wording * DOCSP-49013-whitespace, fix link * DOCSP-49013-fix removal of versions on dependencies * DOCSP-49013-shared include link fix? * DOCSP-49013-fix grammar on link * DOCSP-49013-fix grammar on link * DOCSP-49013-removed versions from mongodb-crypt and all kotlin(x) implementations managed by BOM * DOCSP-49013-encrypt fields update position of tio * DOCSP-49013-suggested changes * DOCSP-49013-encryption reformat * DOCSP-49013-indentation (cherry picked from commit 10143aa924e8ed127962c47d86070d2669793cf0) --- .../builders/builders-data-classes.txt | 9 +++- .../document-data-format-bson.txt | 6 +++ .../data-formats/serialization.txt | 12 +++-- source/fundamentals/encrypt-fields.txt | 51 +++++++++++-------- .../code-snippets/bson-gradle-versioned.rst | 2 +- .../code-snippets/bson-maven-versioned.rst | 1 - .../code-snippets/crypt-gradle-versioned.rst | 2 +- .../code-snippets/crypt-maven-versioned.rst | 1 - .../serialization-libs-gradle-versioned.rst | 4 +- .../serialization-libs-maven-versioned.rst | 2 - 10 files changed, 54 insertions(+), 36 deletions(-) diff --git a/source/fundamentals/builders/builders-data-classes.txt b/source/fundamentals/builders/builders-data-classes.txt index 7439c186..957a5f9c 100644 --- a/source/fundamentals/builders/builders-data-classes.txt +++ b/source/fundamentals/builders/builders-data-classes.txt @@ -49,6 +49,12 @@ To implement this functionality, you must add the ``mongodb-driver-kotlin-extensions`` dependency to your dependencies list. +.. sharedinclude:: dbx/jvm/BOM-installation-tip.rst + + .. replacement:: installation-guide + + :ref:`Add the Driver Bill of Materials ` step of the Quick Start guide. + Select from the following tabs to see how to add the extension dependency to your project by using the :guilabel:`Gradle` and :guilabel:`Maven` package managers: @@ -64,7 +70,7 @@ dependency to your project by using the :guilabel:`Gradle` and .. code-block:: kotlin :caption: build.gradle.kts - implementation("org.mongodb:mongodb-driver-kotlin-extensions:{+full-version+}") + implementation("org.mongodb:mongodb-driver-kotlin-extensions") .. tab:: :tabid: Maven @@ -78,7 +84,6 @@ dependency to your project by using the :guilabel:`Gradle` and org.mongodb mongodb-driver-kotlin-extensions - {+full-version+} After you install the extensions dependency, you can use the extension diff --git a/source/fundamentals/data-formats/document-data-format-bson.txt b/source/fundamentals/data-formats/document-data-format-bson.txt index ccaf0a6a..0612cd0b 100644 --- a/source/fundamentals/data-formats/document-data-format-bson.txt +++ b/source/fundamentals/data-formats/document-data-format-bson.txt @@ -60,6 +60,12 @@ MongoDB Kotlin driver as a dependency to your project, see the :ref:`driver installation ` section of our Quick Start guide. +.. sharedinclude:: dbx/jvm/BOM-installation-tip.rst + + .. replacement:: installation-guide + + :ref:`Add the Driver Bill of Materials ` step of the Quick Start guide. + We recommend that you use the `Maven `__ or `Gradle `__ build automation tool to manage your project's dependencies. Select from the following tabs to see the dependency declaration diff --git a/source/fundamentals/data-formats/serialization.txt b/source/fundamentals/data-formats/serialization.txt index 0a95e955..aeb1f964 100644 --- a/source/fundamentals/data-formats/serialization.txt +++ b/source/fundamentals/data-formats/serialization.txt @@ -60,6 +60,12 @@ Add {+language+} Serialization to Your Project Support for serialization in the {+driver-short+} depends on the official `Kotlin serialization library `__. +.. sharedinclude:: dbx/jvm/BOM-installation-tip.rst + + .. replacement:: installation-guide + + :ref:`Add the Driver Bill of Materials ` step of the Quick Start guide. + Select from the following tabs to see how to add the serialization dependencies to your project by using the :guilabel:`Gradle` and :guilabel:`Maven` package managers: @@ -76,7 +82,7 @@ dependencies to your project by using the :guilabel:`Gradle` and :caption: build.gradle.kts implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:{+serializationVersion+}") - implementation("org.mongodb:bson-kotlinx:{+full-version+}") + implementation("org.mongodb:bson-kotlinx") .. tab:: :tabid: Maven @@ -95,7 +101,6 @@ dependencies to your project by using the :guilabel:`Gradle` and org.mongodb bson-kotlinx - {+full-version+} .. _kotlin-data-class-annotation: @@ -191,7 +196,7 @@ add the dependency to your project by using the :guilabel:`Gradle` and .. code-block:: kotlin :caption: build.gradle.kts - implementation("org.mongodb:bson-kotlinx:{+full-version+}") + implementation("org.mongodb:bson-kotlinx") .. tab:: :tabid: Maven @@ -205,7 +210,6 @@ add the dependency to your project by using the :guilabel:`Gradle` and org.jetbrains.kotlinx bson-kotlinx - {+full-version+} .. note:: bson-kotlin Dependency diff --git a/source/fundamentals/encrypt-fields.txt b/source/fundamentals/encrypt-fields.txt index 0fa23918..884fed0c 100644 --- a/source/fundamentals/encrypt-fields.txt +++ b/source/fundamentals/encrypt-fields.txt @@ -4,25 +4,32 @@ .. replacement:: driver-specific-content - .. important:: Compatible Encryption Library Version - - The {+driver-short+} uses the `mongodb-crypt - `__ - encryption library for in-use encryption. This driver version - is compatible with ``mongodb-crypt`` v{+mongocrypt-version+}. - - Select from the following :guilabel:`Maven` and - :guilabel:`Gradle` tabs to see how to add the ``mongodb-crypt`` - dependency to your project by using the specified manager: - - .. tabs:: - - .. tab:: Maven - :tabid: maven-dependency - - .. include:: /includes/fundamentals/code-snippets/crypt-maven-versioned.rst - - .. tab:: Gradle - :tabid: gradle-dependency - - .. include:: /includes/fundamentals/code-snippets/crypt-gradle-versioned.rst + Compatible Encryption Library Version + ------------------------------------- + + The {+driver-short+} uses the `mongodb-crypt + `__ + encryption library for in-use encryption. This driver version + is compatible with ``mongodb-crypt`` v{+mongocrypt-version+}. + + .. sharedinclude:: dbx/jvm/BOM-installation-tip.rst + + .. replacement:: installation-guide + + :ref:`Add the Driver Bill of Materials ` step of the Quick Start guide. + + Select from the following :guilabel:`Maven` and + :guilabel:`Gradle` tabs to see how to add the ``mongodb-crypt`` + dependency to your project by using the specified manager: + + .. tabs:: + + .. tab:: Maven + :tabid: maven-dependency + + .. include:: /includes/fundamentals/code-snippets/crypt-maven-versioned.rst + + .. tab:: Gradle + :tabid: gradle-dependency + + .. include:: /includes/fundamentals/code-snippets/crypt-gradle-versioned.rst diff --git a/source/includes/fundamentals/code-snippets/bson-gradle-versioned.rst b/source/includes/fundamentals/code-snippets/bson-gradle-versioned.rst index c830af9b..d71aed34 100644 --- a/source/includes/fundamentals/code-snippets/bson-gradle-versioned.rst +++ b/source/includes/fundamentals/code-snippets/bson-gradle-versioned.rst @@ -1,6 +1,6 @@ .. code-block:: kotlin dependencies { - implementation("org.mongodb:bson:{+full-version+}") + implementation("org.mongodb:bson") } diff --git a/source/includes/fundamentals/code-snippets/bson-maven-versioned.rst b/source/includes/fundamentals/code-snippets/bson-maven-versioned.rst index 31e1dd6a..665cc6f1 100644 --- a/source/includes/fundamentals/code-snippets/bson-maven-versioned.rst +++ b/source/includes/fundamentals/code-snippets/bson-maven-versioned.rst @@ -4,7 +4,6 @@ org.mongodb bson - {+full-version+} diff --git a/source/includes/fundamentals/code-snippets/crypt-gradle-versioned.rst b/source/includes/fundamentals/code-snippets/crypt-gradle-versioned.rst index af6427b6..f5284de2 100644 --- a/source/includes/fundamentals/code-snippets/crypt-gradle-versioned.rst +++ b/source/includes/fundamentals/code-snippets/crypt-gradle-versioned.rst @@ -1,5 +1,5 @@ .. code-block:: groovy dependencies { - implementation("org.mongodb:mongodb-crypt:{+mongocrypt-version+}") + implementation("org.mongodb:mongodb-crypt") } \ No newline at end of file diff --git a/source/includes/fundamentals/code-snippets/crypt-maven-versioned.rst b/source/includes/fundamentals/code-snippets/crypt-maven-versioned.rst index 0b2c3b0e..db9fa409 100644 --- a/source/includes/fundamentals/code-snippets/crypt-maven-versioned.rst +++ b/source/includes/fundamentals/code-snippets/crypt-maven-versioned.rst @@ -4,6 +4,5 @@ org.mongodb mongodb-crypt - {+mongocrypt-version+} diff --git a/source/includes/serialization-libs-gradle-versioned.rst b/source/includes/serialization-libs-gradle-versioned.rst index ac994c76..971caa33 100644 --- a/source/includes/serialization-libs-gradle-versioned.rst +++ b/source/includes/serialization-libs-gradle-versioned.rst @@ -2,7 +2,7 @@ :caption: build.gradle.kts :copyable: true - implementation("org.mongodb:bson-kotlinx:{+full-version+}") + implementation("org.mongodb:bson-kotlinx") // OR - implementation("org.mongodb:bson-kotlin:{+full-version+}") + implementation("org.mongodb:bson-kotlin") \ No newline at end of file diff --git a/source/includes/serialization-libs-maven-versioned.rst b/source/includes/serialization-libs-maven-versioned.rst index 16ba6eb6..9fb8d6ee 100644 --- a/source/includes/serialization-libs-maven-versioned.rst +++ b/source/includes/serialization-libs-maven-versioned.rst @@ -5,12 +5,10 @@ org.mongodb bson-kotlinx - {+full-version+} org.mongodb bson-kotlin - {+full-version+} \ No newline at end of file