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

feat(gradle): add gradle module #4423

Merged
merged 10 commits into from Dec 17, 2022

Conversation

NyCodeGHG
Copy link
Contributor

I added a module to display the version of Gradle.

Description

I added 2 different strategies which are available via the config, because invoking the gradle executable is really slow.
Because almost every gradle project uses the Gradle Wrapper i made it the default option to parse the gradle version from the wrappers config file.

Motivation and Context

It adds support for Gradle, a popular choice for the build system in the Java and Kotlin Ecosystem.

Screenshots (if appropriate):

image

How Has This Been Tested?

  • I have tested using MacOS
  • I have tested using Linux
  • I have tested using Windows

I tested my changes on Windows and on a GitHub codespace, I don't own a device running macOS so I can't test that sadly.

Checklist:

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@NyCodeGHG NyCodeGHG changed the title add gradle module feat: add gradle module Sep 30, 2022
src/configs/gradle.rs Outdated Show resolved Hide resolved
src/configs/gradle.rs Outdated Show resolved Hide resolved
src/modules/gradle.rs Outdated Show resolved Hide resolved
src/modules/gradle.rs Outdated Show resolved Hide resolved
@davidkna
Copy link
Member

Please also update the presets in docs/.vuepress/public/presets/toml.

@NyCodeGHG
Copy link
Contributor Author

Now that I think about it, I think it would be better to drop the whole (./)gradle(w) --version execution thing and only provide the wrapper strategy, because the execution is so slow that it would time out most of the time and most gradle users use the wrapper anyway.

@davidkna
Copy link
Member

Now that I think about it, I think it would be better to drop the whole (./)gradle(w) --version execution thing and only provide the wrapper strategy, because the execution is so slow that it would time out most of the time and most gradle users use the wrapper anyway.

That sounds good.

@NyCodeGHG NyCodeGHG force-pushed the feature/gradle-module branch 2 times, most recently from a72fe3c to 4c1921a Compare October 23, 2022 20:15
Copy link
Member

@davidkna davidkna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just have two more minor suggestions, please also fix the conflicts that have arisen.

src/modules/gradle.rs Outdated Show resolved Hide resolved
src/modules/gradle.rs Outdated Show resolved Hide resolved
@NyCodeGHG
Copy link
Contributor Author

Hi! I finally found time and motivation to apply the requested changes and merge the conflicts.
I'm sorry that it took some time

@NyCodeGHG
Copy link
Contributor Author

I'm confused, when i generate the schema locally, there are no changes.

@davidkna
Copy link
Member

davidkna commented Dec 7, 2022

@NyCodeGHG Looks like a text encoding issue, I will go ahead and update it.

@NyCodeGHG
Copy link
Contributor Author

oh sorry, i didn't see your message, yes it was a encoding issue caused by powershell

Copy link
Member

@davidkna davidkna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andytom andytom changed the title feat: add gradle module feat(gradle): add gradle module Dec 17, 2022
@andytom andytom merged commit 220844d into starship:master Dec 17, 2022
@andytom
Copy link
Member

andytom commented Dec 17, 2022

Thank you for your contribution @NyCodeGHG and thank you for reviewing @davidkna.

@NyCodeGHG NyCodeGHG deleted the feature/gradle-module branch December 17, 2022 12:35
Indyandie pushed a commit to Indyandie/starship that referenced this pull request Jul 26, 2023
* docs: document gradle module

* implement gradle module

* gradle-module: add test for wrapper properties case

* docs: improve gradle module documentation

* fix: fix gradle module wrapper properties test

* drop gradle executable strategy

* apply suggested stuff

* Fix config schema
@koppor koppor mentioned this pull request Jan 24, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants