-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Distributed as a Gradle plugin #64
Comments
The library version of Gradle spring-boot used in 1.5.x is I think it's an out-of-date way to create a custom Gradle plugin by Maven because you can't find any docs about it except Spring 1.5.x. In spring boot 2, they refactor the whole project with gradle. We need more help. Here are the official Gradle plugin implementation docs: https://docs.gradle.org/current/userguide/implementing_gradle_plugins.html. |
Interesting. I don't take a closer looks. And I remember that current Spring Boot already use Gradle for management. I'm not sure if it's well supported to develop Gradle plugin with Maven. Maybe @clayburn can give some advice here. |
@tisonkun I would not recommend trying to build a Gradle plugin using Maven, just as I would not recommend building a Maven plugin or extension using Gradle. While maybe possible with significant effort, you will find that it is not documented, and you would have to solve problems such as packaging and publishing on your own. The approach with least friction will be just to use Gradle and its support for creating it's own plugins. While maybe a little clunky, a possible middle ground would to be to build the plugin using Gradle, but invoking Gradle via the |
Then a potential workaround is building a Gradle project to wrap the core functions that published on Maven central. The downside is that it's clumsky to test the unreleased code when changes cover both the core functions and the Gradle plugin. |
Each time you test the gradle plugin, you must first Am I right? Please give your comments 🙏. |
Actually I tend to maintain the Gradle plugin in a new repository if it's not supported to develop with Maven. |
@clayburn Actually, Gradle works well to manage Maven plugin projects, as spotless shows. The point here is how to correctly package JARs and what metadata should be delivered. Spotless can release Maven plugin with Gradle because it uses If Gradle defines public interface to populate/lookup plugin's metadata, I'm glad to invest some time to see if I can make a "Maven plugin for developing Gradle plugin", which basically conveys necessary dependencies as scaffolding and contains packaging logics to develier required metadata like |
Something that can be referred spring-projects/spring-boot@9b15e6b |
Here is another example for reference - https://github.com/joelittlejohn/jsonschema2pojo/blob/master/jsonschema2pojo-gradle-plugin/pom.xml |
This closes #64 Signed-off-by: tison <wander4096@gmail.com>
Ref https://github.com/spring-projects/spring-boot/tree/1.5.x/spring-boot-tools/spring-boot-gradle-plugin
The text was updated successfully, but these errors were encountered: