This message was deleted.
# community-support
s
This message was deleted.
z
obviously this spits in the face of project isolation, but I do need this and I’d like to find a way to idiomatically do this in the best way
note:
ModuleConfig
is simply a
data class
that has some properties that describe a subproject. For example, it has an
hasAndroidTests: Boolean
that is used to configure whether a subproject…has android tests. And if it does, additional tasks are configured. It also allows us to create groupings of related modules (multiple subprojects that are a part of the same feature) and then run android UI tests on just that group/feature
we also have a
ModuleConfig#isPublished
boolean so we can create a root task like
./gradlew publishAssembleDebug
(assemble the debug variant of everything we publish)
I’m currently using a statically defined list in
buildSrc
-
val Modules.ALL: List<ModuleConfig>
. I want to move away from this globally defined list, and allow each subproject to register its
ModuleConfig
itself in its own
subproject/build.gradle.kts
script. My thought process is that instead of a
List<ModuleConfig>
, create a plugin that loops over all subprojects and generates a
DomainObjectCollection<ModuleConfig>
and then allow consumers to observe it
j
I have no idea but there are docs about how to collect jacoco docs but because each project add them instead of doing allprojects { … }. Looks similar to what you want to achieve
z
any chance you could link to the docs you’re referring to?
j
I looked for it but I am finding the new docs released with 7.4 I think, I can't find the older
z
I need to depend on all projects that implement a specific plugin. it’s an aggregation use case
v
That chapter also is about aggregation of information from other projects. It is what the test-report-aggregation and jacoco-report-aggregation plugins are based on. And before those plugins were there, only that chapter described how to aggregate the JaCoCo result files. That's why I think Javi meant it. Whether it solves your problem, I don't know.
👍 1
j
yeah it is, I have misunderstood your issue