Clone the repository and move into it:
git clone [email protected]:dnsimple/dnsimple-java.git
cd dnsimple-java
The project includes an ASDF .tool-versions
file to set up the JVM required to work on the project.
You can install the required version of Java executing asdf install
at the project's root directory.
Run the test suite to check everything works as expected.
You can install this project into your local Maven repository by running:
./gradlew clean publishToMavenLocal
(use gradlew.bat
in Windows instead)
You can then import it into any project as if it were published to the Maven Central repo.
To run the test suite:
./gradlew clean test
(use gradlew.bat
in Windows instead)
This project uses Semantic Versioning. The following instructions use <VERSION>
as a placeholder, where $VERSION
is a MAJOR.MINOR.PATCH
release, such as 1.2.0
.
- Run the test suite and ensure all the tests pass.
- Set the version in
dnsimple.java
:public interface Dnsimple { public static final String VERSION = "<VERSION>"; //... }
- Set the version in
build.gradle
:version = '<VERSION>'
- Finalize the
## main
section inCHANGELOG.md
assigning the version. - Commit and push the changes
git commit -a -m "Release $VERSION" git push origin main
- Wait for CI to complete.
- Create a signed tag.
git tag -a v$VERSION -s -m "Release $VERSION" git push origin --tags
- Publish the signed JAR to OSSRH (be sure to go through the Release configuration section first).
(use
./gradlew clean publish
gradlew.bat
in Windows instead)
You need to create a gradle.properties
file in the root directory of the project. Start by copy and pasting the example gradle.properties.example
file on this repo.
Fill in your signing and OSSRH settings:
- If you have no GPG setup, you can get your signing
keyId
,password
, andsecretKeyRingFile
values following the guide at https://central.sonatype.org/pages/working-with-pgp-signatures.html - If you don't have an OSSRH account, you can get it following the "Initial Setup" section of the guide at https://central.sonatype.org/pages/ossrh-guide.html
Submit unit tests for your changes. You can test your changes on your machine by running the test suite.
When you submit a PR, tests will also be run on the continuous integration environment via Travis.