Gradle. How to specify shared configuration for a list of subprojects?
-
30-05-2021 - |
Frage
There are subprojects
and allprojects
properties, but how can I just literally list the known subset of projects? I try the following approach:
[project(':child1'), project(':child2')] {
...
}
which is inspired by the output of println allprojects
:
[project ':stripper', project ':webui', project ':wikidigest']
but it doesn't work. Log output:
* What went wrong:
A problem occurred evaluating root project 'projects'.
> No signature of method: java.util.ArrayList.call() is applicable for argument types: (build_1ngb77rivv12hrhe33snq4jat0$_run_closure4) values: [build_1ngb77rivv12hrhe33snq4jat0$_run_closure4@38a3f968]
Possible solutions: tail(), wait(), last(), any(), max(), wait(long)
Lösung
The solution was to wrap list by call to configure()
:
configure([project(':child1'), project(':child2')]) {
...
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow