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

Update gradle example to use plugins block. #394

Closed
junghoon-vans opened this issue Dec 10, 2023 · 2 comments
Closed

Update gradle example to use plugins block. #394

junghoon-vans opened this issue Dec 10, 2023 · 2 comments

Comments

@junghoon-vans
Copy link

As currently written in the example code for gradle, It is the legacy way to set up plugins.

If we were to change to code that uses the plugins block, it would be a bit more user-friendly,
nd it would be a simple change to make by reducing the number of lines in the code example.

AS-IS

buildscript {
	repositories {
		mavenLocal()
		mavenCentral()
	}
	dependencies {
		classpath("io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.40")
	}
}

apply plugin: 'io.spring.javaformat'

TO-BE

plugins {
	 id 'io.spring.javaformat' version '0.0.40'
}
@junghoon-vans junghoon-vans changed the title Upgrade gradle in example code. Update gradle example to use plugins block. Dec 10, 2023
@wilkinsona
Copy link
Contributor

Thanks for the suggestion. Until the plugin is published to Gradle's plugin portal (#309), this change as proposed will break people's builds as they won't be able to resolve the plugin. It could be addressed by also configuring the plugin repositories in settings.gradle to add mavenCentral(). I'm not totally convinced it's worth it though. WDYT, @philwebb?

@philwebb
Copy link
Contributor

Given that the project is mainly for ourselves, I don't think we should make the change. We can add a note to #309 to update the docs if we get publishing working.

@philwebb philwebb closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants