|
|
|
|
|
|
8
|
* [The Problem Submodules](#the-problem-submodules)
|
8
|
* [The Problem Submodules](#the-problem-submodules)
|
|
9
|
* [Advanced: Complete Local Setup](#advanced-complete-local-setup)
|
9
|
* [Advanced: Complete Local Setup](#advanced-complete-local-setup)
|
|
10
|
* [Tip: `gradle clean` before `exercism fetch`](#tip-gradle-clean-before-exercism-fetch)
|
10
|
* [Tip: `gradle clean` before `exercism fetch`](#tip-gradle-clean-before-exercism-fetch)
|
|
|
|
11
|
+* [Adding a New Exercise](#adding-a-new-exercise)
|
|
11
|
|
12
|
|
|
12
|
## Overview
|
13
|
## Overview
|
|
13
|
|
14
|
|
|
|
|
|
|
|
15
|
|
16
|
|
|
16
|
If, at any point, you're having any trouble, pop in the [Gitter exercism/java room](https://gitter.im/exercism/java) or the [Gitter exercism/dev room](https://gitter.im/exercism/dev) for help.
|
17
|
If, at any point, you're having any trouble, pop in the [Gitter exercism/java room](https://gitter.im/exercism/java) or the [Gitter exercism/dev room](https://gitter.im/exercism/dev) for help.
|
|
17
|
|
18
|
|
|
|
|
19
|
+For general guidelines about contributing to Exercism see the [Exercism contributing guide](https://github.com/exercism/docs/tree/master/contributing-to-language-tracks).
|
|
18
|
|
20
|
|
|
19
|
## Before Making Your Pull Request
|
21
|
## Before Making Your Pull Request
|
|
20
|
|
22
|
|
|
|
|
|
|
|
132
|
cd ~/workspace/exercism/exercises
|
134
|
cd ~/workspace/exercism/exercises
|
|
133
|
exercism fetch java bob
|
135
|
exercism fetch java bob
|
|
134
|
```
|
136
|
```
|
|
|
|
137
|
+
|
|
|
|
138
|
+## Adding a New Exercise
|
|
|
|
139
|
+
|
|
|
|
140
|
+The easiest way to add a new exercise to the Java track is to port an exercise from another track.
|
|
|
|
141
|
+That means that you take an exercise that has already been implemented in another language and you implement it in this track.
|
|
|
|
142
|
+
|
|
|
|
143
|
+To add a completely new exercise you need to open a pull request to the [problem specifications repository](https://github.com/exercism/problem-specifications/tree/master/exercises).
|
|
|
|
144
|
+Any completely new exercise needs to be added and accepted there before it can be added to the Java track.
|
|
|
|
145
|
+
|
|
|
|
146
|
+There is a [general Exercism guide for porting an exercise to a new language](https://github.com/exercism/docs/blob/master/you-can-help/implement-an-exercise-from-specification.md).
|
|
|
|
147
|
+Please review this before porting an exercise to the Java track.
|
|
|
|
148
|
+
|
|
|
|
149
|
+See [here](http://exercism.io/languages/java/todo) for a list of exercises that have yet to be implemented on the Java track and can therefore be ported to this track.
|
|
|
|
150
|
+Please make sure no one else has a pull request open to implement your chosen exercise before you start.
|
|
|
|
151
|
+Also please make a [dibs pull request](https://github.com/exercism/docs/blob/master/you-can-help/implement-an-exercise-from-specification.md#avoiding-duplicate-work) to make it clear to others that you are working on this exercise.
|
|
|
|
152
|
+
|
|
|
|
153
|
+The Java specific details you need to know about adding an exercise are:
|
|
|
|
154
|
+
|
|
|
|
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
|
+You can also look at other entries in `config.json` as examples and try to mimic them.
|
|
|
|
157
|
+
|
|
|
|
158
|
+2. Please add an entry for your exercise to `settings.gradle`.
|
|
|
|
159
|
+This should just be `include 'exercise-name'`.
|
|
|
|
160
|
+This list is in alphabetical order so please add your exercise so that it maintains this order.
|
|
|
|
161
|
+
|
|
|
|
162
|
+3. Please add an exercise submodule for your exercise.
|
|
|
|
163
|
+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
|
+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
|
+
|
|
|
|
167
|
+Hopefully that should be enough information to help you port an exercise to the Java track.
|
|
|
|
168
|
+Feel free to open an issue or post in the [Gitter exercism/java room](https://gitter.im/exercism/java) if you have any questions and we'll try and answer as soon as we can.
|