Skip to content

Latest commit

 

History

History
112 lines (74 loc) · 3.19 KB

File metadata and controls

112 lines (74 loc) · 3.19 KB

dbos-transact-java

DBOS Transact Java SDK

Setting up dev environment

Install a recent OpenJDK. I use OpenJDK 21.
https://adoptium.net/en-GB/temurin/releases/?os=any&arch=any&version=21

Recommended IDE IntelliJ (Community edition is fine). But feel free to use vi or VSCode, if you are more comfortable with it.

Postgres docker container with localhost
port 5432
user postgres

export PGPASSWORD = password for postgres user

full build

./gradlew clean build

formatting

The DBOS Transact Java SDK uses Spotless for consistent formatting. Spotless checks formatting automatically during build If build fails because of format violations, you can update the code with the spotlessApply Gradle task.

./gradlew spotlessApply

run tests

./gradlew clean test

publish to local maven repository

./gradlew publishToMavenLocal

import transact into your application

Add to your build.gradle.kts

implementation("dev.dbos:transact")      
implementation("ch.qos.logback:logback-classic:1.5.6")

update dependencies

DBOS uses the gradle-versions-plugin to detect dependencies that need updates.

./gradlew dependencyUpdates

This will generate a report on the console and in build/dependencyUpdates/report.txt of the project dependencies that are out of date.

Release Versioning

DBOS Transact for Java follows the Maven version order algorithm.

Creating a Release

Release branch builds are published to Maven Central.

To create a new release, run this from the main branch

java scripts/createRelease --version 1.2.3 --push

This command tags the latest commit with the version number and creates a release branch for it. If a version number is not supplied, it is generated by incrementing the last released minor version. If --push option is provided, the tag and release branch are pushed to origin.

Patching a release

Release branch patch builds are published to Maven Central.

To create a new release, run this from a release branch

java scripts/createRelease --push

This command tags the latest commit with the version number. The version number is generated by incrementing the last released patch version. If --push option is provided, the tag is pushed to origin.

Preview Versions

Main branch builds may be published to Maven Central. To facilitate publishing, main branch builds carry the automatically generated version number (i.e.incremented minor version ) as well as a prerelease tag `-m. The git commit count is the number of commits since the last release.

Feature Branch Versions

Feature branch builds are not designed to be published to Maven Central. Like main branch builds, feature branch builds carry the automatically generated version number and a prerelease tag -a<git-commit-count>. In Maven version order algorithm, the -aprerelease prefix is lower priority than the-mprefix. Feature branch builds also carry an additional-g` prerelease tag.