anchor.diff:  ====
   
   By default, in order to avoid the common mistake of adding a dependency in a platform instead of a constraint, Gradle will fail if you try to do so.
  -If, for some reason, you also want to add _hard dependencies_ in addition to constraints, you need to enable it explicitly:
  +If, for some reason, you also want to add _dependencies_ in addition to constraints, you need to enable it explicitly:
   
   .Allowing declaration of dependencies
   ====
  
positive.code: include::sample[dir="java-platform/quickstart/kotlin",files="build.gradle.kts[tags=allow-dependencies]"]
  ====
  
  [NOTE]
  ====
  When published as a BOM file, dependencies do not make sense for Maven consumers.
  They would only be considered by a Gradle consumer if published with Gradle metadata.
  ====
  
  [[sec:java_platform_project_constraints]]
  == Local project constraints
  
  If what you want to build is a platform for a set of libraries built locally, you can declare constraints onto local components, as demonstrated in the following example:
  
  .Allowing declaration of dependencies
  ====
  include::sample[dir="java-platform/multiproject/groovy/platform",files="build.gradle[tags=project-constraints]"]
  
negative.code: include::sample[dir="java-platform/multiproject/kotlin/platform",files="build.gradle.kts[tags=publishing]"]
  ====
  
  This will generate a BOM file for the platform, with a `<dependencyManagement>` block where its `<dependencies>` correspond to the constraints defined in the platform module.
  
  [[sec:java_platform_consumption]]
  == Consuming platforms
  
  Because a Java Platform is a special kind of component, a dependency on a Java platform has to be declared using the `platform` or `enforcedPlatform` keyword, as explained in the <<managing_dependency_configurations.adoc#sec:bom_import,managing transitive dependencies>> section.
  For example, if you want to share dependency versions between subprojects, you can define a platform module which would declare all versions:
  
  .Recommend versions in a platform module
  