Can a platform BOM be an api dependency?

I’m trying to define a platform BOM as an api dependency of a java-library, but it doesn’t seem to be working. Is this something that’s not supported?

E.g.:

// lib/build.gradle
plugins {
    id "java-library"
}

repositories {
    mavenCentral()
}

dependencies {
    api "net.openhft:chronicle-bom:2.17.465"
    api "net.openhft:chronicle-queue"
}
// dist/build.gradle
plugins {
    id "distribution"
}

repositories {
    mavenCentral()
}

configurations {
    dist {
    }
}

dependencies {
    dist project(":lib")
}

distributions {
    main {
        contents {
            into("lib") {
                from configurations.dist
            }
        }
    }
}

Resulting in the error:

> Task :dist:distTar FAILED
:dist:distTar (Thread[Execution worker for ':' Thread 3,5,main]) completed. Took 0.016 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dist:distTar'.
> Could not resolve all files for configuration ':dist:dist'.
   > Could not find net.openhft:chronicle-queue:.
     Required by:
         project :dist > project :lib

It’s as if there was no api for the platform dependency in the lib subproject. If I specify the queue version it works, but that defeats the point of the BOM. To get this to comile I have to make dist also a java and declare the BOM inside the dist configuration as well. Can this be avoided?