Option to only build certain dependencies
See original GitHub issueExpected Behavior
There sould be an posibility to build only certen Dependencies and not onyl all
Current Behavior
it is only possible to ignore some dependencies in dev mode
Context
- UI5 Module Version (output of
ui5 --version
when using the CLI):1.2.1
Affected components (if known)
The originated problem is that we have a shim for @babel/polyfill
specVersion: "1.0"
kind: extension
type: project-shim
metadata:
name: babel-polyfills
shims:
configurations:
"@babel/polyfill": # name as defined in package.json
specVersion: "1.0"
type: module # Use module type
metadata:
name: "babel-polyfills"
resources:
configuration:
paths:
/lib/babel/: "dist"
when building we want to build this shim but not all other dependencies. that way we could just zip the dist folder and upload that to the SAP Gateway
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:29 (19 by maintainers)
Top Results From Across the Web
Option to only build certain dependencies #386 - GitHub
Expected Behavior There sould be an posibility to build only certen Dependencies and not onyl all Current Behavior it is only possible to ......
Read more >Maven – Optional Dependencies and Dependency Exclusions
The idea is that some of the dependencies are only used for certain features in the project and will not be needed if...
Read more >Maven Modules + Building a Single Specific Module
While the -am command makes all of the projects required by a particular project in a multi-module build, the -amd or --also-make-dependents option...
Read more >Build maven specific module only with dependencies
This recipe shows you how to build a specific Maven module in a multi module Maven project. It may be useful to reduce...
Read more >Add build dependencies - Android Developers
Learn how to add build dependencies using the Gradle build system in Android Studio.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In https://github.com/SAP/ui5-builder/pull/380 @kristian contributed a low level API that might resolve some use cases related to this topic.
The question now is how we expose this on a CLI and/or
ui5.yaml
level. I have compiled the following proposal which combines a newui5.yaml
configuration with new CLI parameters to hopefully allow solving most use cases. Any feedback would be greatly appreciated.Proposal
New ui5.yaml configuration
builder.requiredProjects
As proposed earlier, all listed projects are always built when the project is being built.
This is useful for scenarios where a dependency is exclusively used by the project itself (no reuse) and can therefore be viewed as being a part of the project.
New CLI parameters
--include-dependency
,--include-dependency-regexp
,--exclude-dependency
,--exclude-dependency-regexp
Similar to the already existing
--include-task/--exclude-task
parameters, they can include or exclude dependencies from the build.This can be used to craft custom builds where some dependencies might not be required or are already given by the environment.
--all
will act as an alias for--include-dependency="*"
(including all dependencies). Omitting it is an alias for--exclude-dependency="*"
(excluding all dependencies).The
[...]-regexp=
variants allow specifying a regex that will be matched with themetadata.name
property of the projects. This allows to include or exclude groups of dependencies based on their namespace.Released as part of UI5 CLI v2.12.0 🎉
Check the documentation here (ui5.yaml) and here (CLI).