|
|
@@ -85,6 +85,7 @@ The `exercises` subdirectory contains all of the problem submodules.
|
|
85
|
85
|
Each problem/submodule is a subdirectory of the same name as its slug.
|
|
86
|
86
|
|
|
87
|
87
|
* its `build.gradle` names dependencies required to work that problem.
|
|
|
88
|
+ * its `README.md` describes the exercise.
|
|
88
|
89
|
|
|
89
|
90
|
Each problem/submodule has three source sets:
|
|
90
|
91
|
|
|
|
@@ -152,19 +153,27 @@ Also please make a [dibs pull request](https://github.com/exercism/docs/blob/mas
|
|
152
|
153
|
|
|
153
|
154
|
The Java specific details you need to know about adding an exercise are:
|
|
154
|
155
|
|
|
155
|
|
-1. Please add an entry to the `exercises` array in `config.json`. You can find details about what should be in that entry [here](https://github.com/exercism/docs/blob/master/language-tracks/configuration/exercises.md).
|
|
|
156
|
+* Please add an entry to the `exercises` array in `config.json`. You can find details about what should be in that entry [here](https://github.com/exercism/docs/blob/master/language-tracks/configuration/exercises.md).
|
|
156
|
157
|
You can also look at other entries in `config.json` as examples and try to mimic them.
|
|
157
|
158
|
|
|
158
|
|
-2. Please add an entry for your exercise to `settings.gradle`.
|
|
|
159
|
+* Please add an entry for your exercise to `settings.gradle`.
|
|
159
|
160
|
This should just be `include 'exercise-name'`.
|
|
160
|
161
|
This list is in alphabetical order so please add your exercise so that it maintains this order.
|
|
161
|
162
|
|
|
162
|
|
-3. Please add an exercise submodule for your exercise.
|
|
|
163
|
+* Please add an exercise submodule for your exercise.
|
|
163
|
164
|
See [The Problem Submodules](#the-problem-submodules) section for what needs to be in this.
|
|
164
|
|
-The `build.gradle` file can just be copied from any other exercise submodule.
|
|
165
|
165
|
See the [POLICIES doc](https://github.com/exercism/java/blob/master/POLICIES.md#starter-implementations) for an explanation of when you need to add a starter implementation.
|
|
|
166
|
+The `build.gradle` file can just be copied from any other exercise submodule.
|
|
|
167
|
+The `README.md` file can be generated using [configlet](https://github.com/exercism/configlet/releases).
|
|
|
168
|
+You can do this by:
|
|
|
169
|
+
|
|
|
170
|
+ 1. Download configlet and put it somewhere in your PATH
|
|
|
171
|
+
|
|
|
172
|
+ 2. Clone [the problem-specifications repository](https://github.com/exercism/problem-specifications).
|
|
|
173
|
+
|
|
|
174
|
+ 3. Run `configlet generate . --only name_of_new_exercise` from the root of this repository.
|
|
166
|
175
|
|
|
167
|
|
-4. Check if there is canonical data for the exercise you're adding.
|
|
|
176
|
+* Check if there is canonical data for the exercise you're adding.
|
|
168
|
177
|
This can be found at `https://github.com/exercism/problem-specifications/tree/master/exercises/EXERCISE-SLUG/canonical-data.json`.
|
|
169
|
178
|
If there is canonical data for your exercise then you should follow this when making the tests.
|
|
170
|
179
|
We aim to follow the canonical data as closely as possible in our tests to ensure thorough test coverage.
|