This repository has been archived by the owner on Mar 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract section on setting up into a separate document
As students are not required to maintain certain sections of the developer guide, let's extract those sections into their own files. The benefits are as follows: Cutting down on repetition and visual clutter makes it easier for graders to distinguish between students' work and boilerplate. Students now have a clear distinction to show them what sections they are responsible for maintaining. Let's start by extracting the "Setting Up" section into its own document.
- Loading branch information
Showing
2 changed files
with
90 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
= AddressBook Level 4 - Setting Up | ||
:site-section: DeveloperGuide | ||
:toc: | ||
:toc-title: | ||
:toc-placement: preamble | ||
:sectnums: | ||
:imagesDir: images | ||
:stylesDir: stylesheets | ||
:xrefstyle: full | ||
ifdef::env-github[] | ||
:tip-caption: :bulb: | ||
:note-caption: :information_source: | ||
:warning-caption: :warning: | ||
endif::[] | ||
:repoURL: https://github.com/se-edu/addressbook-level4/tree/master | ||
|
||
== Prerequisites | ||
|
||
. *JDK `11`* or above | ||
. *IntelliJ* IDE | ||
+ | ||
[NOTE] | ||
IntelliJ by default has Gradle and JavaFx plugins installed. + | ||
Do not disable them. If you have disabled them, go to `File` > `Settings` > `Plugins` to re-enable them. | ||
|
||
== Setting up the project in your computer | ||
|
||
. Fork this repo, and clone the fork to your computer | ||
. Open IntelliJ (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project dialog first) | ||
. Set up the correct JDK version for Gradle | ||
.. Click `Configure` > `Project Defaults` > `Project Structure` | ||
.. Click `New...` and find the directory of the JDK | ||
. Click `Import Project` | ||
. Locate the `build.gradle` file and select it. Click `OK` | ||
. Click `Open as Project` | ||
. Click `OK` to accept the default settings | ||
. Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. + | ||
This will generate all resources required by the application and tests. | ||
|
||
== Verifying the setup | ||
|
||
. Run the `seedu.address.Main` and try a few commands | ||
. <<DeveloperGuide#Testing,Run the tests>> to ensure they all pass. | ||
|
||
== Configurations to do before writing code | ||
|
||
=== Configuring the coding style | ||
|
||
This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.adoc[oss-generic coding standards]. IntelliJ's default style is mostly compliant with ours but it uses a different import order from ours. To rectify, | ||
|
||
. Go to `File` > `Settings...` (Windows/Linux), or `IntelliJ IDEA` > `Preferences...` (macOS) | ||
. Select `Editor` > `Code Style` > `Java` | ||
. Click on the `Imports` tab to set the order | ||
|
||
* For `Class count to use import with '\*'` and `Names count to use static import with '*'`: Set to `999` to prevent IntelliJ from contracting the import statements | ||
* For `Import Layout`: The order is `import static all other imports`, `import java.\*`, `import javax.*`, `import org.\*`, `import com.*`, `import all other imports`. Add a `<blank line>` between each `import` | ||
|
||
Optionally, you can follow the <<UsingCheckstyle#, UsingCheckstyle.adoc>> document to configure Intellij to check style-compliance as you write code. | ||
|
||
=== Updating documentation to match your fork | ||
|
||
After forking the repo, the documentation will still have the SE-EDU branding and refer to the `se-edu/addressbook-level4` repo. | ||
|
||
If you plan to develop this fork as a separate product (i.e. instead of contributing to `se-edu/addressbook-level4`), you should do the following: | ||
|
||
. Configure the <<DeveloperGuide#Docs-SiteWideDocSettings, site-wide documentation settings>> in link:{repoURL}/build.gradle[`build.gradle`], such as the `site-name`, to suit your own project. | ||
|
||
. Replace the URL in the attribute `repoURL` in link:{repoURL}/docs/DeveloperGuide.adoc[`DeveloperGuide.adoc`] and link:{repoURL}/docs/UserGuide.adoc[`UserGuide.adoc`] with the URL of your fork. | ||
|
||
=== Setting up CI | ||
|
||
Set up Travis to perform Continuous Integration (CI) for your fork. See <<UsingTravis#, UsingTravis.adoc>> to learn how to set it up. | ||
|
||
After setting up Travis, you can optionally set up coverage reporting for your team fork (see <<UsingCoveralls#, UsingCoveralls.adoc>>). | ||
|
||
[NOTE] | ||
Coverage reporting could be useful for a team repository that hosts the final version but it is not that useful for your personal fork. | ||
|
||
Optionally, you can set up AppVeyor as a second CI (see <<UsingAppVeyor#, UsingAppVeyor.adoc>>). | ||
|
||
[NOTE] | ||
Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based) | ||
|
||
=== Getting started with coding | ||
|
||
When you are ready to start coding, | ||
|
||
1. Get some sense of the overall design by reading <<DeveloperGuide#Design-Architecture>>. | ||
2. Take a look at <<DeveloperGuide#GetStartedProgramming>>. |