Load Maven BOM from local file?

I am evaluating Gradle to potentially replace a large monorepo Maven build. I have a POM file in the Maven build that acts as a bill of materials (BOM) file for the entire Maven project. What I would like to do is load the BOM into a Gradle java-platform. Since this is a monorepo, the BOM file is not deployed to any artifact repository. I tried to load the BOM file locally like this but it didn’t work:

plugins {
    `java-platform`
}

javaPlatform {
    allowDependencies()
}

dependencies {
    api(platform(file("${project.projectDir}/pom.xml")))
}

Is there a way to load a Maven BOM from a local file? Thanks