This directory contains the Java implementation of the Dotprompt library.
Add the following dependency to your project:
Maven:
<dependency>
<groupId>com.google.dotprompt</groupId>
<artifactId>dotprompt</artifactId>
<version>0.1.0</version>
</dependency>Gradle:
implementation 'com.google.dotprompt:dotprompt:0.1.0'Bazel:
maven_install(
artifacts = [
"com.google.dotprompt:dotprompt:0.1.0",
],
# ...
)bazel build //java/com/google/dotprompt:dotpromptbazel test //java/com/google/dotprompt/...This section describes the process for releasing the dotprompt Java library to Maven Central.
-
GPG Keys: You need a GPG key pair to sign artifacts.
- Export the private key:
gpg --armor --export-secret-keys <KEY_ID> - Note the passphrase.
- Export the private key:
-
Sonatype OSSRH Account: You need an account on s01.oss.sonatype.org with access to the
com.google.dotpromptgroup ID.
Configure these secrets in the repository settings (Settings → Secrets and variables → Actions):
| Secret Name | Description |
|---|---|
OSSRH_USERNAME |
Your Sonatype username |
OSSRH_TOKEN |
Your Sonatype password or user token |
MAVEN_GPG_PRIVATE_KEY |
ASCII-armored GPG private key |
MAVEN_GPG_PASSPHRASE |
Passphrase for your GPG key |
Releases are managed by release-please.
-
Commit changes to
mainusing conventional commit messages with thejavascope:feat(java): add new template helper fix(java): resolve parsing issue -
Release-please creates a PR automatically with:
- Updated version in
BUILD.bazel - Generated
CHANGELOG.md
- Updated version in
-
Merge the release PR when ready.
-
Publishing is automated via
.github/workflows/publish_java.yml:- Triggers on release creation
- Signs and uploads to Maven Central
- Check the GitHub Actions workflow logs for success.
- Log in to Sonatype OSSRH to verify the staging repository.
- After sync (typically 10-30 minutes), verify on Maven Central.
To verify artifacts build correctly without publishing:
bazel build //java/com/google/dotprompt:dotprompt_pkgTo inspect the generated POM:
bazel build //java/com/google/dotprompt:dotprompt_pkg-pom
cat bazel-bin/java/com/google/dotprompt/dotprompt_pkg-pom.xml