\n"
- + "Maven
\n"
- + "Import the BOM in the dependencyManagement
section of your pom.xml
file.\n"
+ "### Maven\n"
+ + "Import the BOM in the dependencyManagement
section of your pom.xml
file.\n"
+ "Include specific artifacts you depend on in the dependencies
section, but don't\n"
- + "specify the artifacts' versions in the dependencies
section.
\n"
+ + "specify the artifacts' versions in the dependencies
section.\n"
+ "\n"
- + "The example below demonstrates how you would import the BOM and include the google-cloud-apikeys
\n"
- + "artifact.
\n"
+ + "The example below demonstrates how you would import the BOM and include the "
+ + repoMetadata.getArtifactId()
+ + "
artifact.\n"
+ "\n"
+ "<dependencyManagement>\n"
+ " <dependencies>\n"
@@ -141,16 +146,15 @@ public LibraryOverviewFile(
+ "</artifactId>\n"
+ " </dependency>\n"
+ "</dependencies>\n"
- + "
\n"
- + "\n"
- + "\n"
- + "Gradle
\n"
- + "BOMs are supported by default in Gradle 5.x or later. Add a platform
\n"
+ + "\n\n"
+ + "### Gradle\n"
+ + "BOMs are supported by default in Gradle 5.x or later. Add a platform
\n"
+ "dependency on com.google.cloud:libraries-bom
and remove the version from the\n"
- + "dependency declarations in the artifact's build.gradle
file.
\n"
+ + "dependency declarations in the artifact's build.gradle
file.\n"
+ "\n"
- + "The example below demonstrates how you would import the BOM and include the google-cloud-apikeys
\n"
- + "artifact.
\n"
+ + "The example below demonstrates how you would import the BOM and include the "
+ + repoMetadata.getArtifactId()
+ + "
artifact.\n"
+ "\n"
+ "implementation platform('com.google.cloud:libraries-bom:"
+ librariesBomVersion
@@ -158,36 +162,30 @@ public LibraryOverviewFile(
+ "implementation '"
+ repoMetadata.getDistributionName()
+ "'\n"
- + "
\n"
- + "The platform
and enforcedPlatform
keywords supply dependency versions\n"
+ + "\n\n"
+ + "The platform
and enforcedPlatform
keywords supply dependency versions\n"
+ "declared in a BOM. The enforcedPlatform
keyword enforces the dependency\n"
- + "versions declared in the BOM and thus overrides what you specified.
\n"
- + "\n"
- + "For more details of the platform
and enforcedPlatform
keywords Gradle 5.x or higher, see\n"
- + "Gradle: Importing Maven BOMs.
\n"
+ + "versions declared in the BOM and thus overrides what you specified.\n\n"
+ + "For more details of the platform
and enforcedPlatform
keywords Gradle 5.x or higher, see\n"
+ + "[Gradle: Importing Maven BOMs](https://docs.gradle.org/current/userguide/platforms.html#sub:bom_import).\n"
+ "\n"
- + "If you're using Gradle 4.6 or later, add\n"
+ + "If you're using Gradle 4.6 or later, add\n"
+ "enableFeaturePreview('IMPROVED_POM_SUPPORT')
to your settings.gradle
file. For details, see\n"
- + "Gradle 4.6 Release Notes: BOM import.\n"
- + "Versions of Gradle earlier than 4.6 don't support BOMs.
\n"
- + "\n"
- + "\n"
- + "SBT
\n"
- + "SBT doesn't support BOMs. You can find\n"
+ + "[Gradle 4.6 Release Notes: BOM import](https://docs.gradle.org/4.6/release-notes.html#bom-import).\n"
+ + "Versions of Gradle earlier than 4.6 don't support BOMs.
\n\n"
+ + "### SBT\n"
+ + "SBT [doesn't support BOMs](https://github.com/sbt/sbt/issues/4531). You can find\n"
+ "recommended versions of libraries from a particular BOM version on the\n"
- + "dashboard\n"
- + "and set the versions manually.\n"
- + "To use the latest version of this library, add this to your dependencies:
\n"
+ + "[dashboard](https://storage.googleapis.com/cloud-opensource-java-dashboard/com.google.cloud/libraries-bom/index.html)\n"
+ + "and set the versions manually.\n"
+ + "To use the latest version of this library, add this to your dependencies:\n"
+ "\n"
+ "libraryDependencies += "com.google.cloud" % ""
+ repoMetadata.getArtifactId()
+ "" % ""
+ artifactVersion
+ ""\n"
- + "
\n"
- + "\n"
- + "