personal-accounting

A skeleton project used as a template for creating java libraries.

Features

Usage

  1. If you have not configured open source repository hosting follow these instructions, specifying a groupId of io.github.<your-github-username>. You will need to wait a few hours for this ticket to be completed before pushing any changes.

  2. Clone this repository to a new folder

     git clone git@github.com:clormor/personal-accounting.git <my-new-project> && cd <my-project>
    
  3. Update the project name in all places where it is referenced

     ./scripts/rename-project.sh personal-accounting <my-new-project>
    
  4. Update the modifyPom closure in build.gradle with your porject name, license and developer information

  5. Update the group in build.gradle to your groupId (see step 1)

  6. Set the following environment variables on your local machine e.g. in ~/.bashrc:

  • NEXUS_USER : Your sonatype nexus username (see step 1)
  • NEXUS_PASSWORD : Your sonatype nexus password (see step 1)
  • NEXUS_KEY_ID : Your public key for signing artifacts
  • NEXUS_KEY_PASSWORD : The password you used to encrypt your public key
  • NEXUS_KEY_FILE : ~/.gnupg/secring.gpg
  1. As a sanity check, confirm that your project builds successfully on your local machine

     ./gradlew clean build
    
  2. Create a new repository in GitHub and point update the origin remote

     git remote set-url origin git@github.com:<repository>/<my-new-project>
    
  3. Add your new project in CircleCI and CodeClimate

  • You may need to configure the default branch in CodeClimate to develop under Repo Settings.
  1. Grab the Test Reporter Id from CodeClimate and update the value of CC_TEST_REPORTER_ID in circle.yml

  2. To sign artifacts in circle, copy your base64-encoded secret key to your clipboard. For example, on Mac:

    base64 -i ~/.gnupg/secring.gpg | pbcopy
    
  3. Set the following environment variables in CircleCI:

  • NEXUS_USER : (see step 6)
  • NEXUS_PASSWORD : (see step 6)
  • NEXUS_KEY_ID : (see step 6)
  • NEXUS_KEY_PASSWORD : (see step 6)
  • NEXUS_KEY_FILE : secring.gpg (note this is not the same as the value you set in step 6)
  • NEXUS_KEY_BASE64 : Your base64-encoded secret key (the output from step 11)
  1. Commit and push your changes to develop

    git commit -am "initial commit initiated from https://github.com/clormor/personal-accounting"
    git push --set-upstream origin develop
    

Performing the first release

Releases are generated using the Gradle Sonatype Nexus plugin. See its documentation for guidance.

By default, this project is configured to publish releases to the release branch. The first time you wish to perform a release, you may need to create the release branch, if it does not already exist.

git branch release

You should now be able to perform a release by running ./gradlew release and following the on-screen prompts.