Skip to content
Rodion Moiseev edited this page Mar 14, 2020 · 10 revisions

Contributing to C10N

Configuring Development Environment

Latest C10N development environment (v2.0-dev) uses the following setup:

  • IntelliJ Community Edition 2019.x or above (Ultimate Ed. should work too)
  • OpenJDK 11 (I personally use Adopt Open JDK 11 - HotspotJVM)
    • Note: Java10 and earlier are no longer supported
  • Gradle 6.x as project build environment
  • I personally use MacOS. Linux should work equally well.
    • If you have issue with Windows environments or other problems please open an issue. Thanks.

You will need to install IntelliJ and OpenJDK in advance. Gradle will be automatically downloaded during project setup.

Setting Up a New IntelliJ-based C10N Project Locally

  1. Fork, and checkout the sources (to /home/rodion/c10n, in this example)
$ cd /home/rodion
$ git clone https://github.com/<your_name>/c10n.git
  1. Choose File > Open... from the top menu, or "Open" button if you are seeing the "Welcome to IntelliJ IDEA" screen
    • IMPORTANT: Do not choose Import Project!
  2. Locate the master folder inside the checked out project (in my example /home/rodion/c10n/master), and choose it to be opened.
  3. IntelliJ IDEA will open. At first you will only see the "master" project, you will need to wait a few seconds for IntelliJ to detect the other modules and auto-import them. This may take some time, especially if you don't have Gradle installed. Keep your eye on the status bar at the bottom of the IDEA.

Migrating From Previous IntelliJ-based C10N Project

The recommended cleanest way is to start from scratch (see instructions for the new project).

If you have local git changes and would like to migrate, you can try the following steps

  1. Stash all local changes, or commit them to non-master branch
  2. Close IntelliJ, to prevent it from silently creating or modifying config files
  3. Remove any local IntelliJ configuration files (or back them up, if you think you may have specific local configurations)
    1. Remove any local .idea/ folders, if you have any. In most cases they would appear in either root directory, or under master/ directory.
    2. Remove any local *.ipr, *.iml or *.iws files
  4. Merge or rebase latest changes from master branch
    # Fetch latest master changes from upstream C10N repository
    $ git remote add upstream https://github.com/rodionmoiseev/c10n.git
    $ git fetch upstream
    # Make sure you are in your master branch
    $ git checkout master
    # Merge or rebase from upstream master
    $ git {merge|rebase} upstream/master
    
    • If you experience conflicts in any IntelliJ configuration files, please apply changes from the remote.
  5. Open IntelliJ IDEA and (re)open the project. You may need to give it some time to re-index, rebuild and reload the modules.

For Eclipse Users

Apologies, Eclipse support was temporarily removed due to migration to Java11. Support will be coming soon. Thank you for you patience.

Building from Command Line

To build and test the core project:

$ cd master
$ ./gradlew clean build

To create jars (omit the jar tasks that you don't need):

$ cd master
$ ./gradlew clean jar guiceJar
# To build source code jars
$ ./gradlew clean sourcesJar guiceSourcesJar

Contribution Guidelines

You kind contributions are always appreciated and very welcome!

I am open to all contributions, but since I am the only responsible maintainer, there are limitations:

  • Support for development environments outside of the one mentioned above will be limited. This includes Eclipse integration and Windows support.
  • Please keep your contributions (PRs) as relevant to the issue ticket as possible. If you need to commit indirectly relevant changes, please put them in a separate PR for review, or consult about the change before hand. If change is too specific to your needs, I may kindly ask you to keep the change your own fork until I work out how to fit it into the upstream project concept.
  • Please test locally or in your fork (with Travis) before requesting a merge, as much as possible. Don't worry too much about breaking builds though, I known Travis can behave differently to local sometimes.