@@ -50,35 +50,69 @@ credentials as well as utility methods to create them and to get Application Def
5050
5151## Quickstart
5252
53+ ### Using Maven
54+
55+ #### Google Auth Library Bill of Materials
56+ In order to ensure transitive dependencies and the modules themselves are aligned with each other,
57+ we rely on the Google Auth Library Bill of Materials. Please add this to your dependency management
58+ section as follows:
59+
60+ [ // ] : # ( {x-version-update-start:google-auth-library-bom:released} )
61+ ``` xml
62+ <dependencyManagement >
63+ <dependencies >
64+ <dependency >
65+ <groupId >com.google.auth</groupId >
66+ <artifactId >google-auth-library-bom</artifactId >
67+ <version >1.30.1</version >
68+ <type >pom</type >
69+ <scope >import</scope >
70+ </dependency >
71+ </dependencies >
72+ </dependencyManagement >
73+ ```
74+ [ // ] : # ( {x-version-update-end} )
75+
76+ #### Choosing your implementation
77+
5378If you are using Maven, add this to your pom.xml file (notice that you can replace
5479` google-auth-library-oauth2-http ` with any of ` google-auth-library-credentials ` and
5580` google-auth-library-appengine ` , depending on your application needs):
5681
57- [ // ] : # ( {x-version-update-start:google-auth-library-oauth2-http:released} )
58-
5982``` xml
6083<dependency >
6184 <groupId >com.google.auth</groupId >
85+ <!-- Let the BOM manage the transitive dependencies and module version. -->
86+ <!-- Replace with the implementation module that suits your needs -->
6287 <artifactId >google-auth-library-oauth2-http</artifactId >
63- <version >1.19.0</version >
6488</dependency >
6589```
66- [ // ] : # ( {x-version-update-end} )
67-
6890
91+ ### Using Gradle
6992If you are using Gradle, add this to your dependencies
7093
71- [ // ] : # ( {x-version-update-start:google-auth-library-oauth2-http :released} )
94+ [ // ] : # ( {x-version-update-start:google-auth-library-bom :released} )
7295``` Groovy
73- implementation 'com.google.auth:google-auth-library-oauth2-http:1.19.0'
96+ dependencies {
97+ // The BOM will manage the module versions and transitive dependencies
98+ implementation platform('com.google.auth:google-auth-library-bom:1.30.1')
99+ // Replace this with the implementation module that suits your needs
100+ implementation 'com.google.auth:google-auth-library-oauth2-http'
101+ }
102+
74103```
75104[ // ] : # ( {x-version-update-end} )
76105
106+ Unfortunately, SBT [ cannot] ( https://github.com/sbt/sbt/issues/4531 ) manage dependencies via Maven
107+ Bills of Materials. Therefore, you will have to add the submodule directly. Make sure the module
108+ versions are aligned in case you are using more than one authentication module in order to prevent
109+ transitive dependency conflicts.
77110If you are using SBT, add this to your dependencies
78111
79112[ // ] : # ( {x-version-update-start:google-auth-library-oauth2-http:released} )
80113``` Scala
81- libraryDependencies += " com.google.auth" % " google-auth-library-oauth2-http" % " 1.19.0"
114+ // Replace this with the implementation module that suits your needs
115+ libraryDependencies += " com.google.auth" % " google-auth-library-oauth2-http" % " 1.30.1"
82116```
83117[ // ] : # ( {x-version-update-end} )
84118
0 commit comments