diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 94276eeb..254c3340 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -44,6 +44,7 @@ functions: bootstrap-mongo-orchestration: - command: subprocess.exec + type: test params: binary: bash include_expansions_in_env: @@ -54,6 +55,7 @@ functions: - ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh # run-orchestration generates expansion file with the MONGODB_URI for the cluster - command: expansions.update + type: test params: file: mo-expansion.yml @@ -93,11 +95,11 @@ post: ####################################### tasks: - name: static-analysis - type: test tags: - pr commands: - command: subprocess.exec + type: test params: working_dir: src binary: bash @@ -107,11 +109,11 @@ tasks: - static-checks.sh - name: run-unit-tests - type: test tags: - pr commands: - command: subprocess.exec + type: test params: working_dir: src binary: bash @@ -121,12 +123,12 @@ tasks: - run-unit-tests.sh - name: run-integration-tests - type: test tags: - pr commands: - func: bootstrap-mongo-orchestration - command: subprocess.exec + type: test params: working_dir: src binary: bash @@ -135,6 +137,44 @@ tasks: args: - run-integration-tests.sh + - name: publish-snapshot + depends_on: + - variant: static-checks + name: static-analysis + commands: + - command: subprocess.exec + params: + working_dir: src + binary: bash + add_to_path: + - .evergreen + env: + NEXUS_USERNAME: ${nexus_username} + NEXUS_PASSWORD: ${nexus_password} + SIGNING_PASSWORD: ${signing_password} + SIGNING_KEY: ${signing_key} + RELEASE: "false" + args: + - .evergreen/publish.sh + + - name: publish-release + git_tag_only: true + commands: + - command: subprocess.exec + params: + working_dir: src + binary: bash + add_to_path: + - .evergreen + env: + NEXUS_USERNAME: ${nexus_username} + NEXUS_PASSWORD: ${nexus_password} + SIGNING_PASSWORD: ${signing_password} + SIGNING_KEY: ${signing_key} + RELEASE: "true" + args: + - .evergreen/publish.sh + ######################################## # Axes # ######################################## @@ -199,3 +239,15 @@ buildvariants: - pr tasks: - name: run-integration-tests + + - name: publish-snapshot + display_name: "Publish Snapshot" + run_on: rhel80-small + tasks: + - name: publish-snapshot + + - name: publish-release + display_name: "Publish Release" + run_on: rhel80-small + tasks: + - name: publish-release diff --git a/.evergreen/create-expansions.sh b/.evergreen/create-expansions.sh index ac971852..72d9611c 100755 --- a/.evergreen/create-expansions.sh +++ b/.evergreen/create-expansions.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Get the current unique version of this checkout. if [[ "$is_patch" = true ]]; then diff --git a/.evergreen/fetch-drivers-tools.sh b/.evergreen/fetch-drivers-tools.sh index aa5abe9f..299482b3 100755 --- a/.evergreen/fetch-drivers-tools.sh +++ b/.evergreen/fetch-drivers-tools.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -o errexit diff --git a/.evergreen/java-config.sh b/.evergreen/java-config.sh index 5fb15782..d8f0cb13 100755 --- a/.evergreen/java-config.sh +++ b/.evergreen/java-config.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Java configurations for evergreen diff --git a/.evergreen/publish.sh b/.evergreen/publish.sh new file mode 100755 index 00000000..0597672a --- /dev/null +++ b/.evergreen/publish.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# DO NOT ECHO COMMANDS AS THEY CONTAIN SECRETS! + +set -o errexit # Exit the script with error if any of the commands fail + +############################################ +# Main Program # +############################################ +source java-config.sh + +RELEASE=${RELEASE:false} + +export ORG_GRADLE_PROJECT_nexusUsername=${NEXUS_USERNAME} +export ORG_GRADLE_PROJECT_nexusPassword=${NEXUS_PASSWORD} +export ORG_GRADLE_PROJECT_signingKey="${SIGNING_KEY}" +export ORG_GRADLE_PROJECT_signingPassword=${SIGNING_PASSWORD} + +if [ "$RELEASE" == "true" ]; then + TASK="publishArchives closeSonatypeStagingRepository" # TODO-HIBERNATE-128 - update to closeAndReleaseSonatypeStagingRepository +else + TASK="publishSnapshots" +fi + +SYSTEM_PROPERTIES="-Dorg.gradle.internal.publish.checksums.insecure=true" + +./gradlew -version +./gradlew ${SYSTEM_PROPERTIES} --stacktrace --info ${TASK} diff --git a/.evergreen/run-integration-tests.sh b/.evergreen/run-integration-tests.sh index 3a8d6043..b7b8dd77 100644 --- a/.evergreen/run-integration-tests.sh +++ b/.evergreen/run-integration-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -o xtrace # Write all commands first to stderr set -o errexit # Exit the script with error if any of the commands fail diff --git a/.evergreen/run-unit-tests.sh b/.evergreen/run-unit-tests.sh index 381b88b9..04b5abed 100644 --- a/.evergreen/run-unit-tests.sh +++ b/.evergreen/run-unit-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -o xtrace # Write all commands first to stderr set -o errexit # Exit the script with error if any of the commands fail diff --git a/.evergreen/static-checks.sh b/.evergreen/static-checks.sh index f1e68993..6b9c42bc 100755 --- a/.evergreen/static-checks.sh +++ b/.evergreen/static-checks.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -o xtrace # Write all commands first to stderr set -o errexit # Exit the script with error if any of the commands fail diff --git a/.github/workflows/bump-and-tag.sh b/.github/workflows/bump-and-tag.sh new file mode 100755 index 00000000..0875db6b --- /dev/null +++ b/.github/workflows/bump-and-tag.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -e + +if [ "$#" -ne 3 ]; then + echo "Usage: $0 " >&2 + exit 1 +fi + +CURRENT_VERSION=$1 +RELEASE_VERSION=$2 +NEXT_VERSION=$3 + +SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]}) + +echo "Bump version in gradle.properties to ${RELEASE_VERSION}" +${SCRIPT_DIR}/bump-version.sh "${RELEASE_VERSION_WITHOUT_SUFFIX}-SNAPSHOT" "${RELEASE_VERSION}" + +echo "Create release tag for ${RELEASE_VERSION}" +git tag -a -m "${RELEASE_VERSION}" r${RELEASE_VERSION} + +echo "Bump to snapshot version for ${NEXT_VERSION}" +${SCRIPT_DIR}/bump-version.sh "${RELEASE_VERSION}" "${NEXT_VERSION}-SNAPSHOT" diff --git a/.github/workflows/bump-version.sh b/.github/workflows/bump-version.sh new file mode 100755 index 00000000..eaa92163 --- /dev/null +++ b/.github/workflows/bump-version.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -e + +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " >&2 + exit 1 +fi + +FROM_VERSION=$1 +TO_VERSION=$2 + +sed --in-place "s/version=${FROM_VERSION}/version=${TO_VERSION}/g" gradle.properties +git commit -m "Version: bump ${TO_VERSION}" gradle.properties diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..005ac768 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,139 @@ +name: "Release New Version" +run-name: "Release ${{ inputs.version }}" + +on: + workflow_dispatch: + inputs: + version: + description: "The version to be released (e.g. 1.2.3)" + required: true + type: "string" + +jobs: + prepare-release: + environment: release + name: "Prepare release" + runs-on: ubuntu-latest + permissions: + # Write permission for id-token is necessary to generate a new token for the GitHub App + id-token: write + # Write permission for contents is to ensure we're allowed to push to the repository + contents: write + + steps: + - name: "Create release output" + run: echo '🎬 Release process for version ${{ env.RELEASE_VERSION }} started by @${{ github.triggering_actor }}' >> $GITHUB_STEP_SUMMARY + + - uses: mongodb-labs/drivers-github-tools/secure-checkout@v2 + with: + app_id: ${{ vars.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + + - name: "Store version numbers in env variables" + # The awk command to increase the version number was copied from + # StackOverflow: https://stackoverflow.com/a/61921674/3959933 + # Variables set here: + # RELEASE_VERSION: The version the deployment is expected to create + # RELEASE_VERSION_WITHOUT_SUFFIX: The version without any stability + # suffixes. Example: 5.2.0-beta0 => 5.2.0 + # NEXT_VERSION: The next version to be released. For pre-releases, the + # next version is a snapshot of the pre-release version. Examples: + # 5.2.0 => 5.2.1; 5.2.0-beta0 => 5.2.0 + # RELEASE_BRANCH: The name of the stable branch for this release series + # Example: 5.2.0 => 5.2.x + # Example: 5.2.0-beta1 => + run: | + echo RELEASE_VERSION=${{ inputs.version }} >> $GITHUB_ENV + echo RELEASE_VERSION_WITHOUT_SUFFIX=$(echo ${{ inputs.version }} | awk -F- '{print $1}') >> $GITHUB_ENV + if [[ "${{ inputs.version }}" =~ (alpha|beta|rc)[0-9]+$ ]]; then + echo NEXT_VERSION=$(echo ${{ inputs.version }} | awk -F- '{print $1}') >> $GITHUB_ENV + echo RELEASE_BRANCH=${{ github.ref_name }} >> $GITHUB_ENV + else + echo NEXT_VERSION=$(echo ${{ inputs.version }} | awk -F. -v OFS=. '{$NF += 1 ; print}') >> $GITHUB_ENV + echo RELEASE_BRANCH=$(echo ${{ inputs.version }} | awk -F. -v OFS=. '{$NF = "x" ; print}') >> $GITHUB_ENV + fi + + - name: "Ensure current snapshot version matches release version" + run: | + grep -q "version=${{ env.RELEASE_VERSION_WITHOUT_SUFFIX }}-SNAPSHOT" gradle.properties + if [[ $? != 0 ]]; then + echo '❌ Release failed: version in gradle.properties is not a snapshot for release version ${{ inputs.version }}' >> $GITHUB_STEP_SUMMARY + exit 1 + fi + + - name: "Ensure release tag does not already exist" + run: | + if [[ $(git tag -l r${{ env.RELEASE_VERSION }}) == r${{ env.RELEASE_VERSION }} ]]; then + echo '❌ Release failed: tag for version ${{ inputs.version }} already exists' >> $GITHUB_STEP_SUMMARY + exit 1 + fi + + # For patch releases (A.B.C where C != 0), we expect the release to be + # triggered from the A.B.x maintenance branch. We use the release version + # without suffixes to avoid mistakes when making pre-releases + - name: "Fail if patch release is created from wrong release branch" + if: ${{ !endsWith(env.RELEASE_VERSION_WITHOUT_SUFFIX, '.0') && env.RELEASE_BRANCH != github.ref_name }} + run: | + echo '❌ Release failed due to branch mismatch: expected ${{ inputs.version }} to be released from ${{ env.RELEASE_BRANCH }}, got ${{ github.ref_name }}' >> $GITHUB_STEP_SUMMARY + exit 1 + + # For non-patch releases (A.B.C where C == 0), we expect the release to + # be triggered from main or the A.B.x maintenance branch. This includes + # pre-releases for any non-patch releases, e.g. 5.2.0-beta1 + - name: "Fail if non-patch release is created from wrong release branch" + if: ${{ endsWith(env.RELEASE_VERSION_WITHOUT_SUFFIX, '.0') && env.RELEASE_BRANCH != github.ref_name && github.ref_name != 'main' }} + run: | + echo '❌ Release failed due to branch mismatch: expected ${{ inputs.version }} to be released from ${{ env.RELEASE_BRANCH }} or main, got ${{ github.ref_name }}' >> $GITHUB_STEP_SUMMARY + exit 1 + + # Set commit author information to the user that triggered the release workflow + - name: "Set git author information" + run: | + GITHUB_USER_NAME=$(gh api users/${{ github.actor }} --jq '.name') + GITHUB_USER_ID=$(gh api users/${{ github.actor }} --jq '.id') + git config user.name "${GITHUB_USER_NAME}" + git config user.email "${GITHUB_USER_ID}+${{ github.actor }}@users.noreply.github.com" + + # If a non-patch release is created from a branch other than its + # maintenance branch, create that branch from the current one and push it + # Pre-releases don't have this behaviour, so we can check the full release + # version including stability suffixes to exclude those + - name: "Create new release branch for non-patch release" + if: ${{ endsWith(env.RELEASE_VERSION, '.0') && env.RELEASE_BRANCH != github.ref_name }} + run: | + echo '🆕 Creating new release branch ${{ env.RELEASE_BRANCH }} from ${{ github.ref_name }}' >> $GITHUB_STEP_SUMMARY + git checkout -b ${{ env.RELEASE_BRANCH }} + NEXT_MINOR_VERSION=$(echo "${{ env.RELEASE_VERSION }}" | awk -F. -v OFS=. '{$2 += 1 ; $NF = 0 ; print}') + echo "➡️ Bumping version for ${{ github.ref_name }} branch to ${NEXT_MINOR_VERSION}" >> $GITHUB_STEP_SUMMARY + git checkout ${{ github.ref_name }} + .github/workflows/bump-version.sh "${{ env.RELEASE_VERSION_WITHOUT_SUFFIX }}-SNAPSHOT" "${NEXT_MINOR_VERSION}-SNAPSHOT" + git push origin ${{ github.ref_name }} + git checkout ${{ env.RELEASE_BRANCH }} + + # This step bumps version numbers in gradle.properties and creates git artifacts for the release + - name: "Bump version numbers and create release tag" + run: .github/workflows/bump-and-tag.sh "${{ env.RELEASE_VERSION_WITHOUT_SUFFIX }}" "${{ env.RELEASE_VERSION }}" "${{ env.NEXT_VERSION }}" + + - name: "Push release branch and tag" + run: | + git push origin ${{ env.RELEASE_BRANCH }} + git push origin r${{ env.RELEASE_VERSION }} + + - name: "Create draft release with generated changelog" + run: | + if [[ "${{ inputs.version }}" =~ (alpha|beta|rc) ]]; then + PRERELEASE="--prerelease --latest=false" + fi + echo "RELEASE_URL=$(\ + gh release create r${RELEASE_VERSION} \ + ${PRERELEASE} \ + --target ${{ env.RELEASE_BRANCH }} \ + --title "Java Driver ${{ env.RELEASE_VERSION }} ($(date '+%B %d, %Y'))" \ + --generate-notes \ + --draft\ + )" >> "$GITHUB_ENV" + + - name: "Set summary" + run: | + echo '🚀 Created tag and drafted release for version [${{ env.RELEASE_VERSION }}](${{ env.RELEASE_URL }})' >> $GITHUB_STEP_SUMMARY + echo '✍️ You may now update the release notes and publish the release when ready' >> $GITHUB_STEP_SUMMARY diff --git a/build.gradle.kts b/build.gradle.kts index 7c734e0b..37a40a0f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,6 +14,7 @@ * limitations under the License. */ +import java.time.Duration import net.ltgt.gradle.errorprone.errorprone import org.gradle.api.tasks.testing.logging.TestLogEvent @@ -23,28 +24,57 @@ plugins { id("java-library") id("spotless-java-extension") id("maven-publish") + id("signing") alias(libs.plugins.errorprone) alias(libs.plugins.buildconfig) + alias(libs.plugins.nexus.publish) } repositories { mavenCentral() } java { - toolchain { languageVersion = JavaLanguageVersion.of(17) } + toolchain { languageVersion = JavaLanguageVersion.of(17) } // Remember to update javadoc links withJavadocJar() withSourcesJar() } -tasks.withType { exclude("/com/mongodb/hibernate/internal/**") } +tasks.withType { + exclude("/com/mongodb/hibernate/internal/**") + exclude("com/mongodb/hibernate/dialect/**") + exclude("com/mongodb/hibernate/jdbc/**") + + val standardDocletOptions = options as StandardJavadocDocletOptions + standardDocletOptions.apply { + author(true) + version(true) + encoding = "UTF-8" + charSet("UTF-8") + docEncoding("UTF-8") + addBooleanOption("html5", true) + addBooleanOption("-allow-script-in-comments", true) + // TODO-HIBERNATE-129 addStringOption("-link-modularity-mismatch", "info") + links = + listOf( + "https://docs.oracle.com/en/java/javase/17/docs/api/", + "https://jakarta.ee/specifications/persistence/3.1/apidocs/", + "https://docs.hibernate.org/orm/6.6/javadocs/", + "https://mongodb.github.io/mongo-java-driver/5.3/apidocs/bson/", + "https://mongodb.github.io/mongo-java-driver/5.3/apidocs/mongodb-driver-core/", + "https://mongodb.github.io/mongo-java-driver/5.3/apidocs/mongodb-driver-sync/") + } +} // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Integration Test +// Added `Action` explicitly due to an intellij 2025.2 false positive: https://youtrack.jetbrains.com/issue/KTIJ-34210 sourceSets { - create("integrationTest") { - compileClasspath += sourceSets.main.get().output - runtimeClasspath += sourceSets.main.get().output - } + create( + "integrationTest", + Action { + compileClasspath += sourceSets.main.get().output + runtimeClasspath += sourceSets.main.get().output + }) } val integrationTestSourceSet: SourceSet = sourceSets["integrationTest"] @@ -154,10 +184,30 @@ dependencies { api(libs.hibernate.core) api(libs.mongo.java.driver.sync) + // We need the `libs.findbugs.jsr` dependency to stop `javadoc` from emitting + // `warning: unknown enum constant When.MAYBE` + // `reason: class file for javax.annotation.meta.When not found`. + compileOnly(libs.findbugs.jsr) implementation(libs.sl4j.api) } +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Publishing + +val localBuildRepo: Provider = project.layout.buildDirectory.dir("repo") + +tasks.named("clean") { delete.add(localBuildRepo) } + publishing { + repositories { + // publish to local build dir for testing + // `./gradlew publishMavenPublicationToLocalBuildRepository` + maven { + url = uri(localBuildRepo.get()) + name = "LocalBuild" + } + } + publications { create("mavenJava") { groupId = "org.mongodb" @@ -188,3 +238,99 @@ publishing { } } } + +// Artifact signing +signing { + val signingKey: String? = providers.gradleProperty("signingKey").getOrNull() + val signingPassword: String? = providers.gradleProperty("signingPassword").getOrNull() + if (signingKey != null && signingPassword != null) { + logger.info("[${project.displayName}] Signing is enabled") + useInMemoryPgpKeys(signingKey, signingPassword) + sign(publishing.publications["mavenJava"]) + } else { + logger.info("[${project.displayName}] No Signing keys found, skipping signing configuration") + } +} + +// Publishing to the central sonatype portal currently requires the gradle nexus publishing plugin +// Adds a `publishToSonatype` task +val nexusUsername: Provider = providers.gradleProperty("nexusUsername") +val nexusPassword: Provider = providers.gradleProperty("nexusPassword") + +nexusPublishing { + packageGroup.set("org.mongodb") + repositories { + sonatype { + username.set(nexusUsername) + password.set(nexusPassword) + + // central portal URLs + nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) + snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) + } + } + + connectTimeout.set(Duration.ofMinutes(5)) + clientTimeout.set(Duration.ofMinutes(30)) + + transitionCheckOptions { + // We have many artifacts and Maven Central can take a long time on its compliance checks. + // Set the timeout for waiting for the repository to close to a comfortable 50 minutes. + maxRetries.set(300) + delayBetween.set(Duration.ofSeconds(10)) + } +} + +// Gets the git version +val gitVersion: String by lazy { + providers + .exec { + isIgnoreExitValue = true + commandLine("git", "describe", "--tags", "--always", "--dirty") + } + .standardOutput + .asText + .map { it.trim().removePrefix("r") } + .getOrElse("UNKNOWN") +} + +// Publish snapshots +tasks.register("publishSnapshots") { + group = "publishing" + description = "Publishes snapshots to Sonatype" + + if (version.toString().endsWith("-SNAPSHOT")) { + dependsOn(tasks.named("publishAllPublicationsToLocalBuildRepository")) + dependsOn(tasks.named("publishToSonatype")) + } +} + +// Publish the release +tasks.register("publishArchives") { + group = "publishing" + description = "Publishes a release and uploads to Sonatype / Maven Central" + + val currentGitVersion = gitVersion + val gitVersionMatch = currentGitVersion == version + doFirst { + if (!gitVersionMatch) { + val cause = + """ + Version mismatch: + ================= + + $version != $currentGitVersion + + The project version does not match the git tag. + """ + .trimMargin() + throw GradleException(cause) + } else { + println("Publishing: ${project.name} : $currentGitVersion") + } + } + if (gitVersionMatch) { + dependsOn(tasks.named("publishAllPublicationsToLocalBuildRepository")) + dependsOn(tasks.named("publishToSonatype")) + } +} diff --git a/gradle.properties b/gradle.properties index 048535ea..49939829 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,6 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -version=1.0.0-SNAPSHOT +version=0.1.0-SNAPSHOT org.gradle.jvmargs=-Duser.country=US -Duser.language=en -Dfile.encoding=UTF-8 \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 14ad16d2..20cd5a37 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,8 +18,9 @@ assertj = "3.27.3" google-errorprone-core = "2.36.0" nullaway = "0.12.4" jspecify = "1.0.0" -hibernate-orm = "6.6.25.Final" -mongo-java-driver-sync = "5.3.1" +hibernate-orm = "6.6.25.Final" # Remember to update javadoc links +mongo-java-driver-sync = "5.3.1" # Remember to update javadoc links +findbugs-jsr = "3.0.2" slf4j-api = "2.0.16" logback-classic = "1.5.16" mockito = "5.16.0" @@ -30,6 +31,7 @@ plugin-errorprone = "4.1.0" plugin-buildconfig = "5.5.4" plugin-palantir = "2.58.0" plugin-ktfmt = "0.54" +plugin-nexus-publish = "2.0.0" [libraries] junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" } @@ -40,6 +42,7 @@ google-errorprone-core = { module = "com.google.errorprone:error_prone_core", ve hibernate-core = { module = "org.hibernate.orm:hibernate-core", version.ref = "hibernate-orm" } hibernate-testing = { module = "org.hibernate.orm:hibernate-testing", version.ref = "hibernate-orm" } mongo-java-driver-sync = { module = "org.mongodb:mongodb-driver-sync", version.ref = "mongo-java-driver-sync" } +findbugs-jsr = { module = "com.google.code.findbugs:jsr305", version.ref = "findbugs-jsr" } sl4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j-api" } logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logback-classic" } mockito-junit-jupiter = { module = "org.mockito:mockito-junit-jupiter", version.ref = "mockito" } @@ -51,3 +54,4 @@ test-common = ["junit-jupiter", "assertj", "logback-classic"] [plugins] errorprone = { id = "net.ltgt.errorprone", version.ref = "plugin-errorprone" } buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "plugin-buildconfig" } +nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "plugin-nexus-publish" } diff --git a/src/main/java/com/mongodb/hibernate/annotations/package-info.java b/src/main/java/com/mongodb/hibernate/annotations/package-info.java index a70598e4..2c840f48 100644 --- a/src/main/java/com/mongodb/hibernate/annotations/package-info.java +++ b/src/main/java/com/mongodb/hibernate/annotations/package-info.java @@ -14,6 +14,7 @@ * limitations under the License. */ +/** Annotations for configuring a domain model. */ @NullMarked package com.mongodb.hibernate.annotations; diff --git a/src/main/java/com/mongodb/hibernate/package-info.java b/src/main/java/com/mongodb/hibernate/package-info.java index 502435db..1c322485 100644 --- a/src/main/java/com/mongodb/hibernate/package-info.java +++ b/src/main/java/com/mongodb/hibernate/package-info.java @@ -14,6 +14,7 @@ * limitations under the License. */ +/** The MongoDB Hibernate Extension package. */ @NullMarked package com.mongodb.hibernate;