Skip to content

Commit c293a4c

Browse files
committed
feat: fj-doc-playground-quarkus addJacoco parameter for project init #536
1 parent 4a3a833 commit c293a4c

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/init/ProjectInitInput.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,8 @@ public class ProjectInitInput {
5858
@Setter
5959
private boolean addDirectPlugin;
6060

61+
@Getter
62+
@Setter
63+
private boolean addJacoco;
64+
6165
}

fj-doc-playground-quarkus/src/main/java/org/fugerit/java/doc/playground/init/ProjectRest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
7979
this.flavourVersion = data.getFlavourVersion();
8080
this.addVerifyPlugin = data.isAddVerifyPlugin();
8181
this.addDirectPlugin = data.isAddDirectPlugin();
82+
this.addJacoco = data.isAddJacoco();
8283
super.execute();
8384
}
8485
};

fj-doc-playground-quarkus/src/main/react/src/playground/DocProjectInit.jsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const DocProjectInit = ({setHelpContent}) => {
3838
const [serverContent, setServerContent] = useState(''); // State to store the base64 encoded content from the server
3939
const [addVerifyPlugin, setAddVerifyPlugin] = useState(true); // State to handle addVerifyPlugin selection
4040
const [addDirectPlugin, setAddDirectPlugin] = useState(false); // State to handle addDirectPlugin selection
41+
const [addJacoco, setAddJacoco] = useState(false); // State to handle addJacoco selection
4142

4243
// useEffect to fetch data from the API when the component mounts
4344
useEffect(() => {
@@ -113,6 +114,7 @@ const DocProjectInit = ({setHelpContent}) => {
113114
flavour,
114115
addVerifyPlugin,
115116
addDirectPlugin,
117+
addJacoco,
116118
extensionList: selectedExtensions,
117119
};
118120
try {
@@ -268,7 +270,21 @@ const DocProjectInit = ({setHelpContent}) => {
268270
</RadioGroup>
269271
</FormControl>
270272
</Grid>
271-
<Grid item xs={12} sm={12}>
273+
<Grid item xs={12} sm={6}>
274+
{/* Text field for addJacoco */}
275+
<FormControl component="fieldset" fullWidth margin="normal">
276+
<FormLabel component="legend">Add jacoco</FormLabel>
277+
<RadioGroup
278+
row
279+
value={addJacoco ? 'true' : 'false'}
280+
onChange={(e) => setAddJacoco(e.target.value === 'true')}
281+
>
282+
<FormControlLabel value="true" control={<Radio />} label="true" />
283+
<FormControlLabel value="false" control={<Radio />} label="false" />
284+
</RadioGroup>
285+
</FormControl>
286+
</Grid>
287+
<Grid item xs={12} sm={6}>
272288
{/* Text field for flavourVersion */}
273289
<TextField
274290
label="Flavour version, recommended : leave default (blank)"

0 commit comments

Comments
 (0)