microsoft / vscode-gradle

Manage Gradle Projects, run Gradle tasks and provide better Gradle file authoring experience in VS Code
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-gradle
MIT License
114 stars 46 forks source link

Please introduce manual/auto Gradle dependencies update from editor. #996

Open Artur51 opened 2 years ago

Artur51 commented 2 years ago

Hello. I cannot find a way to update the dependency in my project when the Gradle library is declared with a version pattern implementation "lib:api:1.0.+" Furthermore, there is no menu/shortcut sequence to use this feature. I believe It would be good for the user experience if an additional button is implemented nearby the project dependencies panel. Please implement if possible. Thank you!

CsCherrYY commented 2 years ago

We're going to support some features about Gradle file authoring. One of them is to help you add some dependencies. See: https://github.com/microsoft/vscode-gradle/pull/970. Could you please check if this is the feature you want?

I believe It would be good for the user experience if an additional button is implemented nearby the project dependencies panel.

Sounds good to place something like "CodeLens" in the dependencies panel. It would help us to find this feature.

Artur51 commented 2 years ago

Hello Shi Chen. I have started to use VS Code recently. My first experience was that I could not find how to update dependencies. It is when you need to refresh dependencies for some reason to have new version. I try to find the best way to work with project modules. One is when I have one subproject deployed into a private repository with a new version for the new deployment. In the second project I would like to use this dependency (subproject) without changing the version code each time. So I used the pattern "somePachageName:someGroupName:1.0.+". So I declared the version number as 1.0.+ to have no worries about version change. It is true that I have to update my subproject with the new code frequently. Then in the host project I have to update the dependency but there is no way for the "+" versioned item to do that. To delete dependency and refresh the project is some solution I have found latest. Hope there could be implemented a better solution to avoid this problem. It is true to say that this problem is related, maybe with the gradle. And the is another strange problem (same I have seen in Eclipse and IDEA ide) when for some reason your dependency could not be read, not sure why it is so. Then i have to delete it manually and clear cache form ide.

I hope there is some way to implement an automatic way to fix those states when a file is in the wrong state or when a remote repository has a new version for dependency I declared with the "1.0.+" pattern.

Hope this helps.

The feature you pointed me is a good one, but not connected with the behavior I would like to have changed.

Thank you. Have a good day.

пт, 10 сент. 2021 г. в 05:03, Shi Chen @.***>:

We're going to support some features about Gradle file authoring. One of them is to help you add some dependencies. See: #970 https://github.com/microsoft/vscode-gradle/pull/970. Could you please check if this is the feature is you want?

I believe It would be good for the user experience if an additional button is implemented nearby the project dependencies panel.

Sounds good to place something like "CodeLens" in the dependencies panel. It would help us to find this feature.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-gradle/issues/996#issuecomment-916572943, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARNPHVXFJSIBRHTAT3XU7GLUBFRPVANCNFSM5DXLFKOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

CsCherrYY commented 2 years ago

I hope there is some way to implement an automatic way to fix those states when a file is in the wrong state or when a remote repository has a new version for dependency I declared with the "1.0.+" pattern.

Sounds like something such as "update project" or "refresh project" when the dependency in your private repository has been changed. Is it right? BTW, the mismatch problem you meet is about the Gradle tasks explorer or the Java code? if the later one, did you try to right click the project's build.gradle or settings.gradle and choose Update Project?

Artur51 commented 2 years ago

Hello.

I have tried Update Project. with the steps, you had suggested to me. The new version is not going to download. If I delete the library in Gradle local repository then the same version is redownloaded but not the new one. Hope it helps. Have a nice day.

пн, 13 сент. 2021 г., 10:10 Shi Chen @.***>:

I hope there is some way to implement an automatic way to fix those states when a file is in the wrong state or when a remote repository has a new version for dependency I declared with the "1.0.+" pattern.

Sounds like something such as "update project" or "refresh project" when the dependency in your private repository has been changed. Is it right? BTW, the mismatch problem you meet is about the Gradle tasks explorer or the Java code? if the later one, did you try to right click the project's build.gradle or settings.gradle and choose Update Project?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-gradle/issues/996#issuecomment-917904346, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARNPHVQBRO4AZNQDJCCY3TLUBWPUZANCNFSM5DXLFKOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.