Slackbot
08/09/2023, 3:14 PMJavi
08/09/2023, 3:24 PMMartin
08/09/2023, 3:25 PMroot
up there?Martin
08/09/2023, 3:25 PMrootProject
or something else?Javi
08/09/2023, 3:30 PMMartin
08/09/2023, 3:31 PMJavi
08/09/2023, 3:31 PMJavi
08/09/2023, 3:32 PMMartin
08/09/2023, 3:33 PMJavi
08/09/2023, 3:33 PMMartin
08/09/2023, 3:34 PMallprojects {}
from the root build.gradle
?Javi
08/09/2023, 3:34 PMallproject
is project isolation safe, the project one isn't. But I wouldn't put my hand on the fire 😛Martin
08/09/2023, 3:36 PMbut I think thatYou mean the settings one?is project isolation safe, the project one isn't.allproject
Javi
08/09/2023, 3:36 PMMartin
08/09/2023, 3:37 PMJavi
08/09/2023, 3:38 PMMartin
08/09/2023, 3:39 PMJavi
08/09/2023, 3:40 PMVampire
08/09/2023, 4:05 PMThis is not my case, I have multiple unrelated modules.Where is the difference actually? If you just want to get the test results of all modules in the build, just use
dependencies { testReportAggregation(allprojects) }
. Whether you do that in a stand-alone aggregator project or in the root project doesn't matter.Martin
08/09/2023, 4:07 PMallproject
thing but my this is just over zealous cult to the CC gods from my part 😄Martin
08/09/2023, 4:07 PMdependencies { testReportAggregation(allprojects) }
, thanks!Vampire
08/09/2023, 4:08 PMallprojects { ... }
is bad.
Using allprojects
to depend on them for use-cases like this should not disturb CCVampire
08/09/2023, 4:09 PMallprojects { ... }
(typically) configures other projects and thus is bad as it couples the projects' configurations.
testReportAggregation(allprojects)
is just a shortcut to testReportAggregation(project(":a"), project(":b"), <all others too>
, so while the latter is fine the former should too.Martin
08/10/2023, 9:07 AMdependencies { testReportAggregation(allprojects) }Welp, that didn't go really far 😞
Cannot convert the provided notation to an object of type Dependency: [project ':apollo-kotlin', project ':apollo-kotlin:apollo-adapters', project ':apollo-kotlin:apollo-annotations', project ':apollo-kotlin:apollo-api', project ':apollo-kotlin:apollo-api-java', project ':apollo-kotlin:apollo-ast', project ':apollo-kotlin:apollo-cli', project ':apollo-kotlin:apollo-compiler', project ':apollo-kotlin:apollo-compose-paging-support', project ':apollo-kotlin:apollo-compose-support',
Martin
08/10/2023, 9:09 AMsubprojects.forEach {
testReportAggregation(it)
}
Vampire
08/10/2023, 9:18 AMVampire
08/10/2023, 9:18 AMMartin
08/10/2023, 9:18 AMVampire
08/10/2023, 9:19 AMMartin
08/10/2023, 9:19 AMVampire
08/10/2023, 9:20 AMMartin
08/10/2023, 9:22 AMVampire
08/10/2023, 9:22 AMJavi
08/10/2023, 10:01 AMMartin
08/10/2023, 10:05 AMVampire
08/10/2023, 10:15 AMVampire
08/10/2023, 10:15 AMMartin
08/10/2023, 10:27 AMGradle folks had the goal to have the DSLs at least similar in possibilities.Fair point. I can see how that's desirable and a noble goal albeit one I have personally given up any hope to see in a realistic time frame. The turing completeness of both languages and the lack of a common formalism to describe a shared DSL make that effort gargantuous IMO.
Martin
08/10/2023, 10:28 AMval foo by getting {}
is my daily reminder I should think in terms of Java APIs, not DSLsJavi
08/10/2023, 10:30 AMObject
magic being checked as List<Project>>
(or some List<*>
) on Groovy and not being checked on Kotlin maybe?Martin
08/10/2023, 10:32 AMMartin
08/10/2023, 10:33 AMdependencies {
add("testReportAggregation", allprojects) // no dynamic invoke here because .add is a real API
}
Vampire
08/10/2023, 11:41 AM