You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's add the following features to make this a minimal project
template that students can use to start their project.
* Gradle support, a basic build script
* a skeleton JUnit test
* a basic CheckStyle configuration
* a basic I/O test setup
* support for GitHub actions
* documentation skeletons inside the docs folder
In addition, let's remove the Gradle and JavaFX tutorials as they are
not integral to a project template.
Copy file name to clipboardExpand all lines: README.md
+50-10Lines changed: 50 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,61 @@ This is a project template for a greenfield Java project. It's named after the J
4
4
5
5
## Setting up in Intellij
6
6
7
-
Prerequisites: JDK 17, update Intellij to the most recent version.
8
-
9
-
1. Open Intellij (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project first)
10
-
1. Open the project into Intellij as follows:
11
-
1. Click `Open`.
12
-
1. Select the project directory, and click `OK`.
13
-
1. If there are any further prompts, accept the defaults.
14
-
1. Configure the project to use **JDK 17** (not other versions) as explained in [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk).<br>
15
-
In the same dialog, set the **Project language level** field to the `SDK default` option.
16
-
3. After that, locate the `src/main/java/Duke.java` file, right-click it, and choose `Run Duke.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:
7
+
Prerequisites: JDK 17 (use the exact version), update Intellij to the most recent version.
8
+
9
+
1.**Ensure Intellij JDK 17 is defined as an SDK**, as described [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk) -- this step is not needed if you have used JDK 17 in a previous Intellij project.
10
+
1.**Import the project _as a Gradle project_**, as described [here](https://se-education.org/guides/tutorials/intellijImportGradleProject.html).
11
+
1.**Verify the setup**: After the importing is complete, locate the `src/main/java/seedu/duke/Duke.java` file, right-click it, and choose `Run Duke.main()`. If the setup is correct, you should see something like the below:
17
12
```
13
+
> Task :compileJava
14
+
> Task :processResources NO-SOURCE
15
+
> Task :classes
16
+
17
+
> Task :Duke.main()
18
18
Hello from
19
19
____ _
20
20
| _ \ _ _| | _____
21
21
| | | | | | | |/ / _ \
22
22
| |_| | |_| | < __/
23
23
|____/ \__,_|_|\_\___|
24
+
25
+
What is your name?
24
26
```
27
+
Type some word and press enter to let the execution proceed to the end.
28
+
29
+
## Build automation using Gradle
30
+
31
+
* This project uses Gradle for build automation and dependency management. It includes a basic build script as well (i.e. the `build.gradle` file).
32
+
* If you are new to Gradle, refer to the [Gradle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/gradle.html).
33
+
34
+
## Testing
35
+
36
+
### I/O redirection tests
37
+
38
+
* To run _I/O redirection_ tests (aka _Text UI tests_), navigate to the `text-ui-test` and run the `runtest(.bat/.sh)` script.
39
+
40
+
### JUnit tests
41
+
42
+
* A skeleton JUnit test (`src/test/java/seedu/duke/DukeTest.java`) is provided with this project template.
43
+
* If you are new to JUnit, refer to the [JUnit Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/junit.html).
44
+
45
+
## Checkstyle
46
+
47
+
* A sample CheckStyle rule configuration is provided in this project.
48
+
* If you are new to Checkstyle, refer to the [Checkstyle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/checkstyle.html).
49
+
50
+
## CI using GitHub Actions
51
+
52
+
The project uses [GitHub actions](https://github.com/features/actions) for CI. When you push a commit to this repo or PR against it, GitHub actions will run automatically to build and verify the code as updated by the commit/PR.
53
+
54
+
## Documentation
55
+
56
+
`/docs` folder contains a skeleton version of the project documentation.
57
+
58
+
Steps for publishing documentation to the public:
59
+
1. If you are using this project template for an individual project, go your fork on GitHub.<br>
60
+
If you are using this project template for a team project, go to the team fork on GitHub.
61
+
1. Click on the `settings` tab.
62
+
1. Scroll down to the `GitHub Pages` section.
63
+
1. Set the `source` as `master branch /docs folder`.
64
+
1. Optionally, use the `choose a theme` button to choose a theme for your documentation.
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
81
+
<messagekey="ws.notPreceded"
82
+
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
0 commit comments