Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo api -> implementation of Spring Boot and Dependency management plugin #299

Open
felixscheinost opened this issue Apr 23, 2024 · 1 comment

Comments

@felixscheinost
Copy link

felixscheinost commented Apr 23, 2024

I don't understand the reasoning behind 42ba793

(Besides, this was done in a patch version of Grails and broke my build, that shouldn't happen)

My thinking:

  • I want to use the Spring Boot version that the specific Grails version that I am using is compiled against. (Seems obvious)
  • Newer versions of Gradle, and also the Grails starter recently, have pushed the use of buildSrc.
  • Using buildSrc, it is idiomatic to have some references to e.g. org.springframework.boot.gradle.plugin.SpringBootPlugin, e.g. for dependency management
  • For references to the above class, org.springframework.boot:spring-boot-gradle-plugin needs to be on the compile classpath of buildSrc
  • Before Grails 6.1.2, where org.springframework.boot:spring-boot-gradle-plugin was still api, I could do the following:
dependencies {
  implementation("org.grails:grails-gradle-plugin:${project.property("grailsVersion")}")
  implementation("org.springframework.boot:spring-boot-gradle-plugin")
  implementation("io.spring.gradle:dependency-management-plugin")
}

I didn't have to specify versions for the other two plugins.

  • Since Grails 6.1.2 because of 42ba793 I now have to manually lookup what versions I have to use which is cumbersome.
@matrei
Copy link
Contributor

matrei commented Apr 29, 2024

While I acknowledge what you are saying, I'm not sure that having these dependencies on the compile classpath of all downstream projects is the correct way to solve this.

Also, I believe the springboot version you are referring to is not actually the one defined in the version of grails you are using but the one defined in grails-gradle-plugin which at the moment could be different versions.

A better way, would perhaps be if these dependencies were added to grails-bom (or a new grails-build-bom). Then the versions could be imported by both grails-gradle-plugin and any grails project that would like to use them with synced-up versions.

Regarding the change in patch release version, these dependencies were (to my understanding) never meant to be exposed, but it could not be prevented with previous versions of Gradles compile scope and then it got changed to the unnecessarily open api when upgrading to Gradle 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants