Skip to content

Align Gradle lifecycle tasks and use Yarn-managed UI tooling - #3545

Draft
wborn wants to merge 5 commits into
mainfrom
fix/gradle-lifecycle-and-yarn-tooling
Draft

wborn wants to merge 5 commits into
mainfrom
fix/gradle-lifecycle-and-yarn-tooling

Conversation

@wborn

@wborn wborn commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Description

  • Integrate backend artifacts, UI bundles, component manifests, generated sources, and setup JARs into assemble
  • Make check include backend and UI tests, Spotless, dependency checks, and translation validation. Preserve the standard build = assemble + check lifecycle
  • Keep installDist responsible for preparing the runnable manager distribution and deployment Docker build context
  • Add targeted Gradle tasks for backend unit tests (testBackendUnit), backend integration tests (testBackendIntegration), UI component tests (testUiComponent), and UI app tests (testUiApp)
  • Aggregate tests through testBackend, testUi, and test, preserving execution order while allowing test groups to run independently
  • Keep module-level UI test tasks named npmTest, consistent with npmBuild, and update CI to use the targeted test tasks while preserving compatibility with custom projects
  • Centralize UI source-generation dependencies and reuse the root Yarn installation
  • Coordinate parallel UI npmBuild and npmTest tasks using shared Gradle resources to prevent concurrent writes to overlapping TypeScript outputs while allowing independent builds to run in parallel
  • Track TypeScript project references as configuration inputs to ensure correct task coordination when reusing Gradle's configuration cache
  • Replace direct npx execution in the Knip, browser-installation, and TypeScript-watch Gradle tasks with Yarn-managed tooling
  • Support Knip 6.43.0 by handling Rsbuild configurations statically, declaring public-type dependencies, and accommodating checks before build artifacts exist
  • Make Knip wait for scheduled source generation, UI builds, and tests without introducing additional dependencies for standalone checks
  • Add Knip regression tests covering configuration analysis and published declaration dependencies
  • Add UI task coordination regression tests covering overlapping compiler outputs, independent parallel builds, Knip ordering, standalone checks, and configuration-cache reuse
  • Expose the regression tests through testKnip and testUiLocks, with corresponding Yarn scripts test:knip and test:ui-locks, and include them in the verification lifecycle
  • Replace translation generation and Git-status shell checks in CI with non-mutating checkTranslations validation
  • Update developer documentation with lifecycle commands, targeted test execution, test prerequisites, and parallel UI task coordination

Related to #3150
Closes #3344

Checklist

  • 1. Acceptance criteria of the linked issue(s) are met
  • 2. Tests are written and all tests pass
  • 3. Changes are manually tested by you and the reviewer
  • 4. Documentation is written or updated

- Integrate backend artifacts, UI bundles, component manifests, generated sources, and setup JARs into `assemble`
- Make `check` include backend and UI tests, Spotless, dependency checks, and translation validation. Preserve the standard `build = assemble + check` lifecycle
- Keep `installDist` responsible for preparing the runnable manager distribution and deployment Docker build context
- Make test aggregation explicit: backend unit tests, integration tests, UI component tests, then UI app tests. Preserve independently runnable tasks for selective CI execution
- Centralize UI source-generation dependencies and reuse the root Yarn installation
- Replace direct `npx` execution in the Knip, browser-installation, and TypeScript-watch Gradle tasks with Yarn-managed tooling
- Support Knip 6.43.0 by handling Rsbuild configurations statically, declaring public-type dependencies, and accommodating checks before build artifacts exist
- Add Knip regression tests covering configuration analysis and published declaration dependencies
- Replace translation generation and Git-status shell checks in CI with non-mutating `checkTranslations` validation
- Update developer documentation with lifecycle commands, test aggregation, and targeted verification commands

Related to #3150
Closes #3344
@wborn
wborn requested a review from Ekhorn November 4, 2026 11:57

@Ekhorn Ekhorn left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall changes look good. I'll add a comment on the Knip declaration dependencies list, once I've done more testing and I'll do an AI review.

Comment thread AGENTS.md Resolved
Comment thread yarn.lock Resolved
Comment thread README.md Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Parallel build tasks can race on shared TypeScript outputs and let Knip inspect partially emitted declarations, risking inconsistent artifacts and false failures on clean builds.

2 open issues
What changed in this PR

This PR aligns OpenRemote’s Gradle lifecycle with standard build and verification commands while moving shared UI tooling under Yarn management.

Changes:

  • Integrates artifact generation into assemble and verification into check, with explicit test ordering.
  • Adds Yarn-managed Knip execution, compatibility configuration, regression tests, and public-type dependencies.
  • Introduces non-mutating translation checks and documents standard developer commands.
File Description
yarn.lock Records Knip, public-type dependencies, and updated resolutions.
ui/​util/​test/​knip.test.mjs Adds configuration and declaration-dependency regression tests.
ui/​util/​package.json Adds the Knip regression test script.
ui/​test/​fixtures/​component.ts Makes the component hooks interface internal.
ui/​test/​build.gradle Reuses root Yarn installation for test tooling.
ui/​knip.ts Adds static Rsbuild analysis and pre-build dependency exemptions.
ui/​knip.jsonc Removes the superseded Knip configuration.
ui/​component/​theme/​build.gradle Uses the shared lifecycle clean task.
ui/​component/​rest/​package.json Declares the model dependency for public types.
ui/​component/​rest/​build.gradle Uses centralized generation and assembly wiring.
ui/​component/​or-vaadin-components/​build.gradle Removes redundant clean and analysis-install tasks.
ui/​component/​or-tree-menu/​build.gradle Moves lifecycle handling to shared configuration.
ui/​component/​or-translate/​build.gradle Moves lifecycle handling to shared configuration.
ui/​component/​or-services/​build.gradle Moves lifecycle handling to shared configuration.
ui/​component/​or-scheduler/​package.json Declares i18next for public types.
ui/​component/​or-scheduler/​build.gradle Removes redundant lifecycle tasks.
ui/​component/​or-rules/​package.json Declares dependencies exposed by public types.
ui/​component/​or-rules/​build.gradle Removes redundant lifecycle tasks.
ui/​component/​or-rive-renderer/​build.gradle Moves lifecycle handling to shared configuration.
ui/​component/​or-mwc-components/​build.gradle Moves lifecycle handling to shared configuration.
ui/​component/​or-map/​build.gradle Removes redundant lifecycle tasks.
ui/​component/​or-log-viewer/​package.json Declares i18next for public types.
ui/​component/​or-log-viewer/​build.gradle Removes redundant lifecycle tasks.
ui/​component/​or-json-forms/​package.json Declares i18next for public types.
ui/​component/​or-json-forms/​build.gradle Removes redundant lifecycle tasks.
ui/​component/​or-icon/​build.gradle Separates font preparation and attaches it to assembly.
ui/​component/​or-gauge/​build.gradle Moves lifecycle handling to shared configuration.
ui/​component/​or-element/​build.gradle Uses the shared lifecycle clean task.
ui/​component/​or-dashboard-builder/​package.json Declares i18next for public types.
ui/​component/​or-dashboard-builder/​build.gradle Removes redundant lifecycle tasks.
ui/​component/​or-components/​build.gradle Moves lifecycle handling to shared configuration.
ui/​component/​or-chart/​package.json Declares i18next for public types.
ui/​component/​or-chart/​build.gradle Removes redundant lifecycle tasks.
ui/​component/​or-attribute-picker/​build.gradle Moves lifecycle handling to shared configuration.
ui/​component/​or-attribute-input/​package.json Declares i18next for public types.
ui/​component/​or-attribute-input/​build.gradle Removes redundant lifecycle tasks.
ui/​component/​or-attribute-history/​package.json Declares i18next for public types.
ui/​component/​or-attribute-history/​build.gradle Removes redundant lifecycle tasks.
ui/​component/​or-attribute-card/​build.gradle Moves lifecycle handling to shared configuration.
ui/​component/​or-attribute-barchart/​build.gradle Uses the shared lifecycle clean task.
ui/​component/​or-asset-viewer/​build.gradle Moves lifecycle handling to shared configuration.
ui/​component/​or-asset-tree/​build.gradle Moves lifecycle handling to shared configuration.
ui/​component/​or-app/​package.json Declares i18next and Redux for public types.
ui/​component/​or-app/​build.gradle Removes redundant lifecycle tasks.
ui/​component/​model/​build.gradle Relies on centralized source-generation wiring.
ui/​component/​core/​build.gradle Adds a Yarn-backed compilation task.
ui/​build.gradle Centralizes UI lifecycle, generation, and Knip tasks.
ui/​app/​shared/​build.gradle Adds non-mutating translation validation and font dependencies.
ui/​app/​manager/​package.json Declares dependencies exposed by public types.
ui/​app/​manager/​build.gradle Prepares distributions for lifecycle-driven app tests.
ui/​AGENTS.md Documents shared UI lifecycle conventions.
setup/​build.gradle Includes setup JARs in assembly.
README.md Documents lifecycle commands and test prerequisites.
project.gradle Runs TypeScript watch through root Yarn tooling.
package.json Declares Knip and adds execution scripts.
build.gradle Aggregates assembly, verification, and ordered tests.
AGENTS.md Updates build and test guidance.
.github/​workflows/​ui-check-outdated-translations.yml Uses non-mutating translation validation.
.github/​workflows/​ci_cd.yml Uses Yarn-managed Knip and translation validation.

Review effort: Balanced

Comment thread ui/build.gradle Resolved
Comment thread ui/build.gradle Resolved
wborn added 4 commits November 4, 2026 14:07
- Add `testBackendUnit` and `testBackendIntegration` for separate backend test runs
- Add `testUiComponent` and `testUiApp` for separate UI test runs
- Compose these groups through `testBackend`, `testUi`, and `test`, preserving execution order
- Keep module-level UI tasks named `npmTest`, consistent with `npmBuild`
- Update CI commands while preserving compatibility with custom projects
- Document test commands and prerequisites in README and AGENTS files
- Coordinate `npmBuild` and `npmTest` tasks with shared Gradle resources to prevent concurrent writes to overlapping TypeScript outputs
- Preserve parallel execution for independent reference graphs and manifest analysis
- Make Knip wait for scheduled source generation, builds, and tests while keeping standalone checks independently runnable
- Track TypeScript reference changes so configuration-cache reuse preserves correct locking
- Add regression tests for compiler locking, independent parallel builds, Knip ordering, standalone checks, and configuration-cache invalidation
- Expose the locking tests through `testUiLocks` and `test:ui-locks`, and rename the Knip test script to `test:knip`
- Document why coordination is necessary and how locking affects test parallelism
@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@Ekhorn
Ekhorn self-requested a review November 4, 2026 16:43

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align Gradle lifecycle tasks with standard conventions

3 participants