ExtraPropertiesExtension :- no support in M6?

(tinkerer.tech) #1

Upon trying to use ext properties on my subprojects in a multi-project build I just realized that the ext. properties are not recognized in Gradle M6. Also, searching for ExtraPropertiesExtension both in M6 code and its dsl docs returned no hits.

Therefore, is filtering by project names or path the only option from top-level build.gradle - ie, def filteredprojects = subprojects.findAll { Project project -> project.name.contains()/.startsWith()/ … }

configure(filteredprojects) { … }, etc.

Is there another way by which I could configure or define common tasks for a subset of projects belonging to a multi-project build system?

(Peter Niederwieser) #2

Extra properties were introduced in m9 (check the release notes and migration guide). Before that, there were dynamic properties (equally capable, more error prone). I don’t understand the connection you draw to configuring/defining common tasks in a multi-project build.

(tinkerer.tech) #3

Thanks for the info about ext properties.

In my multi-project build I was exploring ways to filter my subprojects list - eg. by name, by path, by properties, etc. I wanted to define one common custom task that would apply to at least 15 out of my 40 subprojects. Filtering out by extra properties seemed to be a nice way to do it where the burden would still lie with the current/future subproject owner/writers as to whether or not to apply the common tasks to the subprojects (as opposed to me filtering out which subprojects should have the common tasks defined using the subprojects names, paths, etc in the top-level build file) Nothing fancy but a more maintainable way to manage a humongous multiproject build. I’ll consider moving to the 1.0 rc3 soon to take advantage of the newer features. Thanks for all the support!