Skip to content

Latest commit

 

History

History
90 lines (65 loc) · 2.9 KB

CONTRIBUTING.md

File metadata and controls

90 lines (65 loc) · 2.9 KB

Contributing to DNSimple/Java

Getting started

1. Clone the repository

Clone the repository and move into it:

git clone [email protected]:dnsimple/dnsimple-java.git
cd dnsimple-java

2. Install external tools

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.

3. Build and test

Run the test suite to check everything works as expected.

4. Deploy locally for testing

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.

Testing

To run the test suite:

./gradlew clean test

(use gradlew.bat in Windows instead)

Releasing

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.

  1. Run the test suite and ensure all the tests pass.
  2. Set the version in dnsimple.java:
    public interface Dnsimple {
      public static final String VERSION = "<VERSION>";
      //...
    }
  3. Set the version in build.gradle:
    version = '<VERSION>'
  4. Finalize the ## main section in CHANGELOG.md assigning the version.
  5. Commit and push the changes
    git commit -a -m "Release $VERSION"
    git push origin main
  6. Wait for CI to complete.
  7. Create a signed tag.
    git tag -a v$VERSION -s -m "Release $VERSION"
    git push origin --tags
  8. Publish the signed JAR to OSSRH (be sure to go through the Release configuration section first).
    ./gradlew clean publish
    (use gradlew.bat in Windows instead)

Release configuration

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:

Requirements for contributing code to this repo

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.