spring-attic / spring-cloud-gcp

Integration for Google Cloud Platform APIs with Spring
Apache License 2.0
704 stars 694 forks source link

Docs: Wrong Gradle Dep Scope #2545

Closed jamesward closed 3 years ago

jamesward commented 3 years ago

The docs Gradle syntax uses the wrong scope and could be simplified. For example here it has:

compile group: 'org.springframework.cloud', name: 'spring-cloud-gcp-starter-storage'

This should be (for build.gradle.kts):

implementation("org.springframework.cloud:spring-cloud-gcp-starter-storage")

There are ~25 places in the docs that need this fix.

dzou commented 3 years ago

@jamesward - So just to clarify, we should replace all of our gradle snippets

from

dependencies {
    compile group: 'org.springframework.cloud', name: 'spring-cloud-gcp-starter-storage'
}

to this:

dependencies {
    implementation("org.springframework.cloud:spring-cloud-gcp-starter-storage")
}

Is this correct?

jamesward commented 3 years ago

Yup! That is the build.gradle.kts syntax. What I'm not sure about is if there is a different syntax for build.gradle - let me know if you want me to investigate that.

meltsufin commented 3 years ago

@jamesward What do you mean by "wrong scope"? Sorry, I'm not very familiar with Gradle.

jamesward commented 3 years ago

compile is a scope and has been deprecated:

'compile(Any): Dependency?' is deprecated. The compile configuration has been deprecated for dependency declaration. Please use the 'implementation' configuration instead.