@@ -196,9 +196,13 @@ if (buildPrototypes) {
196196}
197197def frontendBuildTask = " frontend:build:${ frontendMode} "
198198
199+ // Workspace root holds package.json and node_modules (shared across editor /
200+ // future portal). Editor-specific paths (src, public, dist, tauri) live one
201+ // level deeper under frontend/editor/. When the portal lands as an embedded
202+ // app, add a sibling frontendPortalDir / frontendPortalDistDir alongside.
199203def frontendDir = file(' ../../frontend' )
200204def frontendEditorDir = file(' ../../frontend/editor' )
201- def frontendDistDir = file(' ../../frontend/editor/dist' )
205+ def frontendEditorDistDir = file(' ../../frontend/editor/dist' )
202206def resourcesStaticDir = file(' src/main/resources/static' )
203207def generatedFrontendPaths = [
204208 ' assets' ,
@@ -263,13 +267,13 @@ tasks.register('npmBuild', Exec) {
263267 doNotTrackState(" Frontend build depends on untracked npmInstall task" )
264268 enabled = buildWithFrontend
265269 group = ' frontend'
266- description = ' Build frontend application'
270+ description = ' Build editor frontend application'
267271 workingDir file(' ../..' )
268272 commandLine = [' task' , frontendBuildTask]
269273 inputs. dir(new File (frontendEditorDir, ' src' ))
270274 inputs. dir(new File (frontendEditorDir, ' public' ))
271275 inputs. file(new File (frontendDir, ' package.json' ))
272- outputs. dir(frontendDistDir )
276+ outputs. dir(frontendEditorDistDir )
273277
274278 // Show live output
275279 standardOutput = System . out
@@ -280,25 +284,25 @@ tasks.register('npmBuild', Exec) {
280284 environment ' VITE_API_BASE_URL' , ' /'
281285
282286 doFirst {
283- println " Building frontend application for production (mode=${ frontendMode} , VITE_API_BASE_URL=/)"
287+ println " Building editor frontend application for production (mode=${ frontendMode} , VITE_API_BASE_URL=/)"
284288 }
285289}
286290
287291tasks. register(' copyFrontendAssets' , Copy ) {
288292 enabled = buildWithFrontend
289293 group = ' frontend'
290- description = ' Copy frontend build to static resources'
294+ description = ' Copy editor frontend build to static resources'
291295 dependsOn npmBuild
292296 dependsOn cleanFrontendAssets
293- from(frontendDistDir ) {
297+ from(frontendEditorDistDir ) {
294298 // Exclude files that conflict with backend static resources
295299 exclude ' robots.txt' // Backend already has this
296300 exclude ' favicon.ico' // Backend already has this
297301 }
298302 into resourcesStaticDir
299303 duplicatesStrategy = DuplicatesStrategy . INCLUDE // Let frontend overwrite when needed
300304 doFirst {
301- println " Copying frontend build from ${ frontendDistDir } to ${ resourcesStaticDir} ..."
305+ println " Copying frontend build from ${ frontendEditorDistDir } to ${ resourcesStaticDir} ..."
302306 println " Backend static resources will be preserved"
303307 }
304308 doLast {
@@ -330,7 +334,7 @@ tasks.named('copyFrontendAssets').configure {
330334}
331335
332336if (buildWithFrontend) {
333- println " Frontend build enabled - JAR will include React frontend (mode=${ frontendMode} )"
337+ println " Editor frontend build enabled - JAR will include React frontend (mode=${ frontendMode} )"
334338 processResources. dependsOn copyFrontendAssets
335339} else {
336340 println " Frontend build disabled - JAR will be backend-only with API landing page"
0 commit comments