This is a step-by-step guide for setting up a development environment on your local machine. Using this environment, you can contribute to the project by working on features, enhancements, bug fixes, etc.
All the instructions in this document work for Linux, OS X, and Windows, with the following pointers:
- Replace
./gradlew
togradlew.bat
if you are using Windows. - All the commands are assumed to be run from the root project folder, unless specified otherwise.
- When a version is specified for any tool, install that version instead of the latest version available.
If you encounter any problems during the setup process, please refer to our troubleshooting guide before posting a help request in our issue tracker.
-
Install Git.
- (Optional but recommended) Install Sourcetree or other similar Git client.
-
Fork our repo at https://github.com/TEAMMATES/teammates. Clone the fork to your hard disk.
-
Add a remote name (e.g
upstream
) for your copy of the main repo. Fetch the remote-tracking branches from the main repo to keep it in sync with your copy.git remote add upstream https://github.com/TEAMMATES/teammates.git git fetch upstream
Verification: Use the command
git branch -r
and the following lines should be part of the output:upstream/master upstream/release
-
Set your
master
branch to track the main repo'smaster
branch.git checkout master git branch -u upstream/master
More information can be found at this documentation.
These tools are necessary regardless of whether you are developing front-end or back-end:
-
Install JDK 1.8.
-
Install Python 2.7.
-
Install Google Cloud SDK (minimum version 222.0.0). Follow the directions given here. Note that you do not need to initialize the SDK.
# Run the following command at the Google Cloud SDK directory # Linux/OS X ./install.sh --path-update true # Windows install.bat --path-update true
If you are installing in Red Hat, CentOS, Fedora, Debian or Ubuntu, refer to the quick start of Google Cloud SDK for Debian/Ubuntu or Red Hat/CentOS/Fedora respectively.
Verification: Run a
gcloud
command (e.g.gcloud version
) in order to verify that you can access the SDK from the command line. -
Run the following command to install App Engine Java SDK bundled with the Cloud SDK:
# Linux/OS X/Windows gcloud -q components install app-engine-java # Red Hat/CentOS/Fedora sudo yum install google-cloud-sdk-app-engine-java # Debian/Ubuntu sudo apt-get install google-cloud-sdk-app-engine-java
Verification: Run
gcloud version
and there should be an entry onapp-engine-java
.
If you want to develop front-end, you need to install the following:
- Install Node.js (minimum version 8.9.4).
- (Optional but highly recommended) Install Angular CLI version 6 globally.
Verification: Run
npm install -g @angular/cli@6
ng
and you should see a list of available Angular CLI commands.
-
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. -
Modify the following config file:
gradle.properties
If you want to use a JDK other than the one specified in your PATH variable, add the value to the variableorg.gradle.java.home
.
-
Run this command to download the necessary tools for front-end development (if you are going to be involved):
npm install
Verification: A folder named
node_modules
should be added to the project root directory.
You are encouraged, but not required, to use an IDE to assist development tasks.
We currently support two IDEs: Eclipse IDE and IntelliJ IDEA. 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.
If you have followed every step correctly, your development environment should be set up successfully.
Proceed to the development routine as outlined in this document.