inferModulePath doesn't work with Spring's dependency management plugin

Finally figured out that the reason I was getting all these module not found errors is that the module path inference doesn’t seem to pick up dependencies added by the ‘io.spring.dependency-management’ plugin (I’m using 1.0.9.RELEASE.)

Here’s the simplest project I could come up with that demostrates the module resolution errors:
GradleModuleIssue.zip (67.6 KB)

Does anyone know of a workaround for this?

Doing a blunt-force copy of classpath to module path works for some cases, but not in multi-project builds. (subprojects aren’t part of the classpath I guess?)

java {
    modularity.inferModulePath = true

    tasks.withType(JavaCompile) {
        doFirst {
            options.compilerArgs = ['--module-path', classpath.asPath]
        }
    }
}