-
Notifications
You must be signed in to change notification settings - Fork 270
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
Dependencies should be pulled during gradle execution time #123
Comments
As far as I understand in this case none of the tools (IDEs, Review Tools) which relies on gradle project model will be able to properly handle such dependencies. This is unacceptable for this plugin. If you aware of how to deal with it – contributions are welcome. |
I have not read through the implementation for this project, but the way that plugins should handle injecting dependencies is by:
Then, if this project needs to be compiled (based on the task given to gradle), only then will the dependencies get pulled. All tools that are based on gradle will work fine. I have built a plugin this way, and it is the recommended way (unfortunately it is closed source, so I cannot show you it). I'll take a look at this plugin's source when I get the chance. |
@nathanabercrombie thanks for the answer. IntelliJ dependencies are not the maven dependency What the plugin does during the configuration:
So it cannot attach dependencies with |
I suspected that was what was happening. The only solution to this is if you host the ivy repo remotely. I am not sure what Idea's policies are on uploading those jars to something like maven central, but it wouldn't be hard to script it. This is a deal breaker for my project. I have a work around though: my company provides an internal repository host, so I may just upload the required jars there. There are other really cool features of this plugin, so I was hoping to use it. |
If this a solution for you then you can upload IDEA zips to your internal maven repository. You can use distributions and pom-files from https://www.jetbrains.com/intellij-repository/releases or https://www.jetbrains.com/intellij-repository/snapshots. Then substitute repo host url via
What kind of features do you mean? I think I can extract them so you'll be able to use them without downloading IDEA distribution. |
Hey, I figured out a pretty elegant solution. This passes my test of:
I did this experiment with the
|
Hopefully you can integrate the above solution, but, the features I was referring to are:
|
I'm going to reimplement all tasks one by one as part of #110 issue. So they will be available without IDEA dependency, the will have cleaner configurations (via task extension, not via |
I failed to implement it so far. A suggested solution with a |
Any ETA on this? |
@raniejade no, contributions are welcome |
I don't think this will be solved without adding a new feature into gradle, is there any particular reason we cant publish to a maven repo the jars in |
@raniejade Alexey well described the situation in the related issue at Gradle issue tracker |
I thought about this a bit more and there is a new hook that seems like it could give you what you need: |
@oehme sounds promising! I'll try it and will tell about the results. |
Has there been any progress on this? |
@DreierF there is |
@zolotov does this mean that this is fixed? 🤞 |
@raniejade yes, should be available in 0.5-SNAPSHOT. In order to see the stacktrace of dependency resolution, run it with |
So good, thanks @zolotov! |
As a best practice, dependencies should be pulled during gradle execution time. This means that this plugin should not download the huge dependency files during configuration.
Downloading at configuration time is bad practice because when a large project configures, it configures every module, regardless of what it is going to run. So if I have a large gradle project, and one of the modules has this plugin applied, but I am building a different module, it will still pull the dependency. This does not scale well at all for large projects.
The text was updated successfully, but these errors were encountered: