ADR-0008: Library projects have no webapp/, detection runs through ui5.yaml
Status: Accepted
Context
Applications keep their sources in webapp/ and have a manifest.json. UI5 libraries do not: the sources are under src/<namespace-as-path>/ and there is no manifest.json. Rules written for applications cannot assume webapp/.
Decision
- For libraries the project type is
ui5.yaml#type(applicationorlibrary), not the file layout. - Rules that apply to libraries read different sources for
lib:src/<namespace-as-path>/andui5.yamlinstead ofwebapp/andmanifest.json. - The mapping from application sources to library sources is documented in the catalog section "Special cases for libraries".
- Rules that make no sense for libraries do not list
libas a project type, for exampleno-custom-controls. A rule such asxml-viewsapplies to libraries only if they contain UI5 controls. - The helpers for this live in
util/library.tsin the core plugin.