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
There are two types of practice exercises in the Java track.
4
+
5
+
- The most common are come from the [problem specifications repository][problem-specifications].
6
+
The repository contains data that is common for all implementations, such as the introduction, instructions and the test cases.
4
7
5
-
The easiest way to add a new exercise to the Java track is to port an exercise from another track.
6
-
That means that you take an exercise that has already been implemented in another language, and you implement it in this track.
8
+
- The others _do_ not have data in the problem specification and are specific to the Java track.
7
9
8
-
To add a completely new exercise you need to open a pull request to the [problem specifications repository][problem-specifications].
9
-
Any completely new exercise needs to be added and accepted there before it can be added to the Java track.
10
+
If you are looking to add a completely new exercise that is not from the [problem specifications repository][problem-specifications], please open a discussion in the forums in the [Java][forum-java] category for Java specific exercises or the [Building Exercism][forum-building-exercism] category for adding to the [problem specifications repository][problem-specifications].
10
11
11
-
Before porting an exercise to the Java track, please review the [practice exercise guide][docs-building-exercises-practice].
12
+
If the exercise is already in the problem specifications, please check that no one else has claimed the issue or pull request.
13
+
An issue can be "claimed" by asking (in a comment on the issue) if you can work on it.
12
14
13
-
Please make sure no one else has a pull request open to implement your chosen exercise before you start.
15
+
## Adding a new Practice Exercise
14
16
15
-
It might also be a good idea to open a Pull Request to make it clear to others that you are working on this exercise.
16
-
This can just be a Pull Request with an empty commit that states which new exercise you're working on.
17
-
[Mark the Pull Request as Draft][github-draft-pr] to let the maintainers know that it's not ready for review yet.
17
+
Before adding an exercise to the Java track, please review the [practice exercise guide][docs-building-exercises-practice].
18
+
19
+
The easiest way to get started is to use [configlet][docs-configlet] to provide some of the scaffolding.
This will create the necessary entries in `config.json`, create the directory and pulls the exercise's document files from the problem specifications repository.
18
26
19
27
The Java specific details you need to know about adding an exercise are:
20
28
21
-
- Please add an entry to the `exercises` array in `config.json`.
29
+
- Please check the entry added by configlet to the `exercises` array in `config.json`.
30
+
The entries are sorted by difficulty, then name.
22
31
You can find details about what should be in that entry at the [Exercism docs][docs-building-config-json].
23
32
You can also look at other entries in `config.json` as examples and try to mimic them.
24
33
@@ -30,11 +39,12 @@ The Java specific details you need to know about adding an exercise are:
30
39
In the `resources/exercise-template` you will find a template to get you started.
31
40
See [The Problem Submodules](../CONTRIBUTING.md#the-problem-submodules) section for details on how each exercise submodule is structured.
32
41
33
-
- Use the configlet to [generate documentation and metadata files][docs-building-configlet-sync-new-exercise] for the new exercise.
42
+
- Please copy and add the Gradle files and directories from the `resources/exercise-template` directory.
43
+
This should allow you to run Gradle from the exercise's directory.
34
44
35
45
- Make sure you've followed the [track policies](../POLICIES.md), especially the ones for exercise added/updated.
36
46
37
-
Hopefully that should be enough information to help you port an exercise to the Java track.
47
+
Hopefully that should be enough information to help you add a practice exercise to the Java track.
38
48
Feel free to open an issue or post in the [Building Exercism][forum-building-exercism] category of the [Exercism forum][forum] if you have any questions, and we'll try and answer as soon as we can.
0 commit comments