@@ -88,36 +88,36 @@ public class NodeTasks implements FallibleCommand {
8888 public NodeTasks (Options options ) {
8989
9090 ClassFinder classFinder = new ClassFinder .CachedClassFinder (
91- options .classFinder );
91+ options .getClassFinder () );
9292 FrontendDependenciesScanner frontendDependencies = null ;
9393
9494 Set <String > webComponentTags = new HashSet <>();
9595
9696 final FeatureFlags featureFlags = options .getFeatureFlags ();
9797
98- if (options .enablePackagesUpdate || options .enableImportsUpdate
99- || options .enableWebpackConfigUpdate ) {
98+ if (options .isEnablePackagesUpdate () || options .isEnableImportsUpdate ()
99+ || options .isEnableWebpackConfigUpdate () ) {
100100 frontendDependencies = new FrontendDependenciesScanner .FrontendDependenciesScannerFactory ()
101- .createScanner (!options .useByteCodeScanner , classFinder ,
102- options .generateEmbeddableWebComponents ,
101+ .createScanner (!options .isUseByteCodeScanner () , classFinder ,
102+ options .isGenerateEmbeddableWebComponents () ,
103103 featureFlags );
104104
105105 // The dev bundle check needs the frontendDependencies to be able to
106106 // determine if we need a rebuild as the check happens immediately
107107 // and no update tasks are executed before it.
108- if (!options .productionMode && options .isDevBundleBuild ()) {
108+ if (!options .isProductionMode () && options .isDevBundleBuild ()) {
109109 UsageStatistics .markAsUsed ("flow/expressBuild" , null );
110110 if (TaskRunDevBundleBuild .needsBuild (options ,
111111 frontendDependencies , classFinder )) {
112- options .runNpmInstall (true );
113- options .copyTemplates (true );
112+ options .withRunNpmInstall (true );
113+ options .withCopyTemplates (true );
114114 } else {
115115 // A dev bundle build is not needed after all, skip it
116116 options .withDevBundleBuild (false );
117117 }
118118 }
119119
120- if (options .generateEmbeddableWebComponents ) {
120+ if (options .isGenerateEmbeddableWebComponents () ) {
121121 FrontendWebComponentGenerator generator = new FrontendWebComponentGenerator (
122122 classFinder );
123123 Set <File > webComponents = generator .generateWebComponents (
@@ -136,14 +136,14 @@ public NodeTasks(Options options) {
136136 }
137137
138138 TaskUpdatePackages packageUpdater = null ;
139- if (options .enablePackagesUpdate
140- && options .jarFrontendResourcesFolder != null ) {
139+ if (options .isEnablePackagesUpdate ()
140+ && options .getJarFrontendResourcesFolder () != null ) {
141141 packageUpdater = new TaskUpdatePackages (classFinder ,
142142 frontendDependencies , options );
143143 commands .add (packageUpdater );
144144 }
145145
146- if (packageUpdater != null && options .runNpmInstall ) {
146+ if (packageUpdater != null && options .isRunNpmInstall () ) {
147147 commands .add (new TaskRunNpmInstall (packageUpdater , options ));
148148
149149 commands .add (new TaskInstallFrontendBuildPlugins (options ));
@@ -155,7 +155,7 @@ public NodeTasks(Options options) {
155155
156156 }
157157
158- if (options .createMissingPackageJson ) {
158+ if (options .isCreateMissingPackageJson () ) {
159159 TaskGeneratePackageJson packageCreator = new TaskGeneratePackageJson (
160160 options );
161161 commands .add (packageCreator );
@@ -165,7 +165,7 @@ public NodeTasks(Options options) {
165165 addGenerateServiceWorkerTask (options ,
166166 frontendDependencies .getPwaConfiguration ());
167167
168- if (options .productionMode || options .isFrontendHotdeploy ()
168+ if (options .isProductionMode () || options .isFrontendHotdeploy ()
169169 || options .isDevBundleBuild ()) {
170170 addGenerateTsConfigTask (options );
171171 }
@@ -181,13 +181,13 @@ public NodeTasks(Options options) {
181181
182182 commands .add (new TaskGenerateFeatureFlags (options ));
183183
184- if (options .jarFiles != null
185- && options .jarFrontendResourcesFolder != null ) {
184+ if (options .getJarFiles () != null
185+ && options .getJarFrontendResourcesFolder () != null ) {
186186 commands .add (new TaskCopyFrontendFiles (options ));
187187 }
188188
189- if (options .localResourcesFolder != null
190- && options .jarFrontendResourcesFolder != null ) {
189+ if (options .getLocalResourcesFolder () != null
190+ && options .getJarFrontendResourcesFolder () != null ) {
191191 commands .add (new TaskCopyLocalFrontendFiles (options ));
192192 }
193193
@@ -202,12 +202,12 @@ public NodeTasks(Options options) {
202202 pwa = new PwaConfiguration ();
203203 }
204204 commands .add (new TaskUpdateSettingsFile (options , themeName , pwa ));
205- if (options .productionMode || options .isFrontendHotdeploy ()
205+ if (options .isProductionMode () || options .isFrontendHotdeploy ()
206206 || options .isDevBundleBuild ()) {
207207 commands .add (new TaskUpdateVite (options , webComponentTags ));
208208 }
209209
210- if (options .enableImportsUpdate ) {
210+ if (options .isEnableImportsUpdate () ) {
211211 commands .add (new TaskUpdateImports (classFinder ,
212212 frontendDependencies ,
213213 finder -> getFallbackScanner (options , finder , featureFlags ),
@@ -217,18 +217,18 @@ public NodeTasks(Options options) {
217217 frontendDependencies .getThemeDefinition (), options ));
218218 }
219219
220- if (options .copyTemplates ) {
220+ if (options .isCopyTemplates () ) {
221221 commands .add (new TaskCopyTemplateFiles (classFinder , options ));
222222
223223 }
224224 }
225225
226226 private void addBootstrapTasks (Options options ) {
227227 commands .add (new TaskGenerateIndexHtml (options ));
228- if (options .productionMode || options .isFrontendHotdeploy ()
228+ if (options .isProductionMode () || options .isFrontendHotdeploy ()
229229 || options .isDevBundleBuild ()) {
230230 commands .add (new TaskGenerateIndexTs (options ));
231- if (!options .productionMode ) {
231+ if (!options .isProductionMode () ) {
232232 commands .add (new TaskGenerateViteDevMode (options ));
233233 }
234234 }
@@ -253,7 +253,7 @@ private void addGenerateServiceWorkerTask(Options options,
253253 }
254254
255255 private void addEndpointServicesTasks (Options options ) {
256- Lookup lookup = options .lookup ;
256+ Lookup lookup = options .getLookup () ;
257257 EndpointGeneratorTaskFactory endpointGeneratorTaskFactory = lookup
258258 .lookup (EndpointGeneratorTaskFactory .class );
259259
@@ -262,7 +262,7 @@ private void addEndpointServicesTasks(Options options) {
262262 .createTaskGenerateOpenAPI (options );
263263 commands .add (taskGenerateOpenAPI );
264264
265- if (options .frontendGeneratedFolder != null ) {
265+ if (options .getFrontendGeneratedFolder () != null ) {
266266 TaskGenerateEndpoint taskGenerateEndpoint = endpointGeneratorTaskFactory
267267 .createTaskGenerateEndpoint (options );
268268 commands .add (taskGenerateEndpoint );
@@ -272,10 +272,10 @@ private void addEndpointServicesTasks(Options options) {
272272
273273 private FrontendDependenciesScanner getFallbackScanner (Options options ,
274274 ClassFinder finder , FeatureFlags featureFlags ) {
275- if (options .useByteCodeScanner ) {
275+ if (options .isUseByteCodeScanner () ) {
276276 return new FrontendDependenciesScanner .FrontendDependenciesScannerFactory ()
277277 .createScanner (true , finder ,
278- options .generateEmbeddableWebComponents ,
278+ options .isGenerateEmbeddableWebComponents () ,
279279 featureFlags , true );
280280 } else {
281281 return null ;
0 commit comments