Skip to content

Latest commit

 

History

History
80 lines (60 loc) · 3.97 KB

settingUp.md

File metadata and controls

80 lines (60 loc) · 3.97 KB

Setting up a development environment

This is a step-by-step guide to setting up a development environment in your local machine. You will use that environment to work on features, enhancements, bug fixes, etc. which ultimately allows you to contribute to the project.

The instructions in all parts of this document work for Linux, OS X, and Windows, with the following pointers:

  • Replace ./gradlew to gradlew.bat if you are using Windows.
  • All the commands are assumed to be run from the root project folder, unless otherwise specified.
  • When a version is specified for any tool, install that version instead of the latest version available.

If you encounter any problems during the setting up process, please refer to our troubleshooting guide before posting a help request in our issue tracker.

Step 1: Install necessary tools and languages

  1. Install Source Tree or other similar Git Client, or at least Git.
  2. Install JDK 1.7.
  3. Install Node.js (minimum version 4.x).

Step 2: Obtain your own repository copy

  1. Fork our repo at https://github.com/TEAMMATES/teammates. Clone that fork to your hard disk.

  2. Add a remote name (e.g upstream) for the main repo for your repo to keep in sync with.

    git remote add upstream https://github.com/TEAMMATES/teammates.git

    Verification: Use the command git remote -v and the following lines should be part of the output:

     upstream        https://github.com/TEAMMATES/teammates.git (fetch)
     upstream        https://github.com/TEAMMATES/teammates.git (push)
    
  3. Set your master branch to track the main repo's master branch.

    git checkout master
    git branch -u upstream/master

More information can be found at this documentation.

Step 3: Set up project-specific settings and dependencies

  1. Run this command to download the correct version Google App Engine SDK as used in the project:

    ./gradlew appengineDownloadSdk

    Verification: Check your Gradle folder (the directory can be found with the command ./gradlew printUserHomeDir). A folder named appengine-sdk` should be present.

  2. Run this command to download the necessary tools for JavaScript development:

    npm install

    Verification: A folder named node_modules should be added to the project root directory.

  3. Run this command to create the main config files (these are not under revision control because their contents vary from developer to developer):

    ./gradlew createConfigs

    Verification: The file named gradle.properties should be added to the project root directory.

  4. Modify the following config files:

    • gradle.properties
      If you want to use a JDK other than the one specified in your PATH variable, add the value to the variable org.gradle.java.home. This value must be a valid JDK 1.7 directory. Windows users should use a forward slash(/) instead of the Windows default backward slash(\) while specifying the path.
    • src/test/resources/test.properties
      Append a same unique id (e.g your name) to each of the default accounts found at the bottom of this file, e.g change test.student1.account=alice.tmms to test.student1.account=alice.tmms.KevinChan.

If you followed every step correctly, you should have successfully set up the development environment. You may proceed to the development routine as lined out in this document.

Step 4: (Optional but recommended) Set up an IDE

You are encouraged, but not required, to use an IDE to assist many development tasks.

We currently support two IDEs: Eclipse IDE (full support) and IntelliJ IDEA (experimental; limited support). Support requests related to other IDEs will not be entertained.

Refer to this document if you wish to set up an IDE for developing TEAMMATES.