Extensions in composite build settings

I have a composite build where I define a few ext properties in settings to use later on in my tasks. Ex:

settings.gradle:

includeBuild('project1') {
    ext.doSomething = true
}

includeBuild('project2') {
    ext.doSomething = false
}

includeBuild('project3') {
    ext.doSomething = false
}

build.gradle

gradle.includedBuilds.each {
    if (it.doSomething) {
        // doSomething
    }
}

This was working in 4.9. Now that 6.0 is out, I’ve been migrating to it, but this appears to no longer work. The build bombs out with a Could not get unknown property 'doSomething' exception.

So I’m not sure if it’s broken, no longer supported or was never supposed to work in the first place. And if it’s the latter, a better way of achieving the same? I’m looking to define metadata at the composite build level w/o having to open up the underlying build.gradle’s that were included.