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 Java JDK 11.
If you want to develop front-end, you need to install the following:
- Install Node.js (minimum version 12.11.1).
- (Optional but highly recommended) Install Angular CLI version 9 globally.
Verification: Run
npm install -g @angular/cli@9
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 variable
org.gradle.java.home
. - If you want to use a specific Google Cloud SDK installation, add the value to the variable
cloud.sdk.home
. A minimum version of274.0.0
is required.
- If you want to use a JDK other than the one specified in your PATH variable, add the value to the variable
-
Run this command to download the necessary tools for front-end development (if you are going to be involved):
npm ci
Verification: A folder named
node_modules
should be added to the project root directory.
Q: Can I set up the project in IDEs, e.g. Eclipse, IntelliJ?
A: You are welcome to; the core team have been using IntelliJ to a varying degree of success, and it is expected that any IDE that support Gradle-based Java project will work. However, IDE-based development (even with IntelliJ) is not actively supported/maintained by the team.
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.