is it not possible to use a bundle with platform? ...
# community-support
c
is it not possible to use a bundle with platform?
Copy code
testFixturesImplementation(platform(libs.bundles.spring.bom))
error
Copy code
Cannot convert the provided notation to an object of type Dependency: property(org.gradle.api.artifacts.ExternalModuleDependencyBundle, map(org.gradle.api.artifacts.ExternalModuleDependencyBundle map(valueof(DependencyBundleValueSource)) check-type())).
The following types/formats are supported:
  - String or CharSequence values, for example 'org.gradle:gradle-core:1.0'.
  - Maps, for example [group: 'org.gradle', name: 'gradle-core', version: '1.0'].
  - FileCollections, for example files('some.jar', 'someOther.jar').
  - Projects, for example project(':some:project:path').
  - ClassPathNotation, for example gradleApi().
v
Afair no. You would need to iterate over the bundle and do platform for each member iirc
e
honestly it feels a bit odd to me to use a bundle as a platform too
if you do want to group them, I'd create a subproject like
spring-platform/build.gradle.kts
Copy code
plugins {
    `java-platform`
}
javaPlatform {
    allowDependencies()
}
dependencies {
    api(platform(libs.spring.bom))
    // etc.
}
and then use
Copy code
dependencies {
    implementation(platform(project(":spring-platform")))
}
or something like that
c
honestly it feels a bit odd to me to use a bundle as a platform too
why? a bundle is just a list of dependencies to be applied in order. Why should it matter if it's a platform or not. Platforms are just a specialized type of dependency, but you can still apply them in order
not having it work makes the api inconsistent, but inconsistent apis are common in gradle