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-inspector): Add an option to provide the init.gradle #9214

Conversation

bennati
Copy link
Contributor

@bennati bennati commented Sep 27, 2024

The idea is to enable the user to provide a customized init.gradle to gradle-inspector via the analyzer configuration

Signed-off-by: Stefano Bennati <stefano.bennati@here.com>
@bennati bennati requested a review from a team as a code owner September 27, 2024 16:47
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.10%. Comparing base (b3e9ddb) to head (33af103).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9214   +/-   ##
=========================================
  Coverage     67.10%   67.10%           
  Complexity     1187     1187           
=========================================
  Files           240      240           
  Lines          7904     7904           
  Branches        908      908           
=========================================
  Hits           5304     5304           
  Misses         2232     2232           
  Partials        368      368           
Flag Coverage Δ
funTest-docker 60.23% <ø> (ø)
funTest-non-docker 34.56% <ø> (ø)
test 36.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sschuberth
Copy link
Member

The idea is to enable the user to provide a customized init.gradle to gradle-inspector via the analyzer configuration

Could you provide an example when using a custom init.gradle could be useful?

Using GI's generated init.gradle is a crucial part in getting the analysis right, as it applies a temporarily extracted Gradle plugin. I cannot think of a case where it makes sense to customize that.

@sschuberth
Copy link
Member

Using GI's generated init.gradle is a crucial part in getting the analysis right, as it applies a temporarily extracted Gradle plugin. I cannot think of a case where it makes sense to customize that.

As a side note, what would make a little bit more sense to me is to allow passing a custom init.gradle for the "legacy" Gradle analyzer instead of GI, because for the former the whole logic is implemented in init.gradle without a separate plugin being applied.

@bennati
Copy link
Contributor Author

bennati commented Sep 30, 2024

We want to configure a default maven repository (artifactory) which is accessible to all projects.

Is the legacy Gradle analyzer not going to be deprecated in favor of Gradle Inspector?

@sschuberth
Copy link
Member

We want to configure a default maven repository (artifactory) which is accessible to all projects.

So you want to use an additional, custom init.gradle that is used together with ORT's one, correct?

If so, what you considered to put your init.gradle below GRADLE_USER_HOME?

@bennati
Copy link
Contributor Author

bennati commented Oct 1, 2024

Thanks, using a custom init.gradle also works. Closing this PR.

@bennati bennati closed this Oct 1, 2024
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.

2 participants