Closed jamesward closed 2 years ago
It looks like what is needed is (for build.gradle.kts
):
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:Hoxton.RELEASE")
}
}
For 1.2.x versions of the project, we're actually part of the Spring Cloud BOM (spring-cloud-dependencies
), and you don't really need to include our spring-cloud-gcp-dependencies
BOM, unless you want a different version of the dependencies.
We should probably make this point more clear in the section of the docs.
I tried without the BOM and got:
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find org.springframework.cloud:spring-cloud-gcp-starter-firestore:.
For reference my plugins:
plugins {
id("org.springframework.boot") version "2.3.4.RELEASE"
id("io.spring.dependency-management") version "1.0.10.RELEASE"
kotlin("jvm") version "1.4.10"
kotlin("plugin.spring") version "1.4.10"
}
Taken directly from start.spring.io:
plugins {
id 'org.springframework.boot' version '2.3.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
repositories {
mavenCentral()
}
ext {
set('springCloudVersion', "Hoxton.SR8")
}
dependencies {
implementation 'org.springframework.cloud:spring-cloud-gcp-starter'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test {
useJUnitPlatform()
}
Ah, so I need that BOM. I guess that is what should be in the docs :) I didn't start with start.spring.io
Yep, keeping the issue open to update the docs. Thanks!
@meltsufin Is this still relevant?
I think we can close it. Our current reference documentation does show Spring Cloud GCP BOM usage for Gradle.
In the docs for using the BOM it isn't clear how to use the BOM with Gradle.