Skip to content

Commit 0b400c1

Browse files
authored
feat: add configuration to TaskGenerateHilla (#14221)
1 parent a0c300e commit 0b400c1

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

‎flow-server/src/main/java/com/vaadin/flow/server/frontend/NodeTasks.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,8 @@ private NodeTasks(Builder builder) {
796796
// use the new Hilla generator if available, otherwise the old
797797
// generator.
798798
if (hillaTask != null) {
799+
hillaTask.configure(builder.getNpmFolder(),
800+
builder.getBuildDirectory());
799801
commands.add(hillaTask);
800802
} else {
801803
if (builder.endpointSourceFolder != null

‎flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskGenerateHilla.java‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,24 @@
1515
*/
1616
package com.vaadin.flow.server.frontend;
1717

18+
import java.io.File;
19+
1820
/**
1921
* Generate the Vaadin TS files for endpoints, and the Client API file. It uses
2022
* the new Maven/Gradle plugin based generator.
2123
* <p>
2224
* For internal use only. May be renamed or removed in a future release.
2325
*/
2426
public interface TaskGenerateHilla extends FallibleCommand {
25-
27+
/**
28+
* Configures the task by passing it some parameters.
29+
*
30+
* @param projectDirectory
31+
* the project root directory. In a Maven multi-module project,
32+
* this is the module root, not the main project one.
33+
* @param buildDirectoryName
34+
* the name of the build directory (i.e. "build" or "target").
35+
*/
36+
default void configure(File projectDirectory, String buildDirectoryName) {
37+
}
2638
}

0 commit comments

Comments
 (0)