This repository contains documentation for the MongoDB Kotlin Driver.
Please file issue reports or requests at the Documentation Jira Project.
Build the API documentation docs for any major and minor version releases.
Use Dokka to generate the API documentation and publish it on GitHub Pages.
- To execute a build, you must have Java JDK 17 or later installed. Use
the following
brew
commands to installjEnv
andOpenJDK
to manage your Java versions:
brew install jenv
brew install openjdk@17
- When you install
OpenJDK
, the log includes a command that starts withsudo ln -sfn
. Execute this command to create a symbolic link. Then, run the following commands to add the JDK to your environment, modifying the path and version number to match the version of OpenJDK that you installed. For example, for version 17:
jenv add /Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home/
jenv global 17.0
- Fork and clone the
mongo-java-driver
repository. Navigate to the repository and run the followinggradle
command:
./gradlew dokkaHtml
- If successful, this command generates API docs in
./build/docs/
. Check out the upstreamgh-pages
branch:
git checkout gh-pages
-
To work in a feature branch, create one off of the
gh-pages
branch by checking outgh-pages
and then running the following command:git checkout -b my-feature-branch
-
If a directory for the API docs branch that you're building doesn't exist, create the directory. For example:
mkdir -p 4.10/apidocs/
- Move the contents of the
./build/docs/
directory into the target version directory. For example:
mv ./build/docs/* 4.10/apidocs/
- Stage the newly-created docs in Git and ensure that the list of staged files only contains the pages you want. For example:
git add 4.10/apidocs
git status
- Commit and push your changes to your feature branch. Then, create a
PR against the official repository's
gh-pages
branch. After it is approved and you merge the PR, your changes will automatically be published to GitHub Pages.
To build the API documentation for all of the drivers, including the
Kotlin driver, that are based on the Java driver, see the docs-java-other
README
file.
All documentation is available under the terms of a Creative Commons License.
The MongoDB Documentation Project is governed by the terms of the MongoDB Contributor Agreement.
-- The MongoDB Docs Team