Skip to content

Building the project

Prerequisites

  • Java SE 17 or later

Check out, build, and extend Codyze

  1. Fork the Codyze repo on GitHub and clone it:
    git clone git://github.com/<YOUR GITHUB>/codyze
  2. Create a branch for your contribution. We recommend prefixing the branch name with fix- if you are providing a bug fix or feature- if you plan to add a feature:
    git checkout -b feature-MY_EPIC_FEATURE
  3. Make your changes and make sure that the project builds without errors, passes all tests, and is properly formatted: ./gradlew :codyze-cli:clean :codyze-cli:spotlessApply :codyze-cli:build :codyze-cli:installDist
    The purpose of these gradle tasks is as follows:
    • clean Removes previous build artifacts
    • spotlessApply Applies source code formatting with the settings in formatter-settings.xml. If the code is not properly formatted the build server will reject it.
    • build Builds the main artifact (the jar file containing Codyze)
    • installDist Create an executable script for Linux, Mac, and Windows in codyze-cli/build/install/codyze-cli/bin
  4. When everything works, git commit your changes and git push them to GitHub, then create a pull request (PR). Make sure to describe want you intend the code to do and refer to any issues your PR might address (using the notation #123)
  5. If you're not yet ready for a review, add "WIP" to the PR name to indicate it's a work in progress.
  6. Wait for the automated CI workflow to do some checks.
  7. Continue working on your PR by pushing further commits to your branch until you are satisfied
  8. When you're ready for a review, add a comment to the PR, and remove any "WIP" markers.

Code formatting

Codyze uses the gradle spotless plugin to format source code. You may import the code style definitions into your favorite IDE to apply it immediately.

Gradle

  • Simply run ./gradlew :codyze-cli:spotlessApply

IDEs

You may find plugins for your favorite IDE that can execute Spotless within your IDE for you. Please refer to your respective IDE.