You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current usage recommendation of this plugins shows all build parameters defined globally for the entire project.
We typically operate with a larger root project which multiple sub-projects. Each of those sub-projects may have parameters that are distinct to just that project.
Ideally we would like to apply the plugin to a sub-project, define the build parameters for that project, and reference from within the build file the parameters are defined in.
Is it possible to use this plugin to define build parameters per sub-project?
The text was updated successfully, but these errors were encountered:
It's not possible to define parameters per subproject. My recommendation would be to use parameter groups to separate parameters of the individual sub projects.
Is there a specific technical limitation why this plugin requires the parameters to be defined inside of a generated plugin instead of allowing them to be configured in the build file?
@ikstewa your question is the answer already 🙃 This plugin's goal is to provide compile-safe access to parameters supplied to a build. In order to do this, we need to generate some code, that you can compile your build script against. It's not possible to specify a parameter and use it in the same script, because the code that's backing the parameter can't be generated without compiling the build script. But in order to compile the build script, you need the generated code.
What you could do is generate multiple plugins with different plugin IDs. So for each module in your build you would set up a dedicated build-parameters module that generates the build parameters plugin for that module. You need to use the buildParameters.pluginId(String) method to set a unique plugin ID for each generated plugin.
The current usage recommendation of this plugins shows all build parameters defined globally for the entire project.
We typically operate with a larger root project which multiple sub-projects. Each of those sub-projects may have parameters that are distinct to just that project.
Ideally we would like to apply the plugin to a sub-project, define the build parameters for that project, and reference from within the build file the parameters are defined in.
Is it possible to use this plugin to define build parameters per sub-project?
The text was updated successfully, but these errors were encountered: