-
Notifications
You must be signed in to change notification settings - Fork 37
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
Make the root project a composite build #97
Conversation
You don't need to publish on
Ideally we want to avoid having to open two separate project to work with samples and/or plugins. The convenience of the current setup is that you open a project and you have everything there. |
Sorry, I meant mavenLocal, not mavenCentral 🤦♂️ . As I said in the other PR, I'm not a fan of using mavenLocal as it introduces a global state that can have side effects and that needs to be maintained.
Technically, you can do all the work from the composite build and edit the plugin files from there.
The drawback being that changing the plugin requires to call Let me know what you think. I started to work on this while working on lazy configuration because I changed some API in |
Sounds like composite build could help us improve the project setup 👍 I'm in for it. I just ask you to unwrap the setup that you're proposing here. Ideally the base project should be the one in the root folder. From there you should include all the sample modules (as gradle module) and In other words: in the top level include(":samples:junit-tests",
":samples:kotlin-android",
":samples:kotlin-android-moshi-codegen",
":samples:kotlin-coroutines",
":samples:groovy-android")
includeBuild(":plugin") This will make sure that by running |
2cd975e
to
b4b681a
Compare
f7e5a65
to
c478120
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! I tested it and it works great! Really looking forward to merge this. I left just a minor comment
@martinbonnin I think that #101 caused merge conflicts with this branch. Sorry 😢 Let me know if you need support or you are able to address them by yourself (I don't expect it being very complex) |
dce1d30
to
8fadb86
Compare
@macisamuele this branch renames a lot of files so I guess that was expected. I just rebased on master, it should be good now. |
@martinbonnin ++ Thanks a lot for helping in improving our gradle configurations 💯 |
@cortinico @martinbonnin : I'm the kind of lazy developer ;) Having a gradle task that would behave like the current |
I'm totally in for nuking the Makefile. @martinbonnin do you want to take this? |
👍 I'll open a PR. What's a good name for the gradle task that'll do everything ? test is already taken. Something like |
What about |
I'd rather go for |
One more step towards lazy task configuration (#69)
This pull requests
moves the samples to a composite buildmakes the rootProject a composite build that will treat the plugin as an included build.This allows to do dependency substitution on the plugin artifact and therefore have the sample code in sync with the plugin code from the repo (without having to publish on
mavenCentralmavenLocal or jcenter first).If you're working on the samples, you should openOpening the root project in intelliJ is still the recommended way to work on the project as it will include the necessary projects.swagger-gradle-codegen/sample
in your favorite IDE.