-
Notifications
You must be signed in to change notification settings - Fork 310
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
LocationAwareException
when using GradleInspector with Gradle version < 6.8
#9282
Comments
Do not use that feature before it was added in Gradle 6.8, see [1]. This is a fixup for 8deb4b3. Fixes #9282. [1]: https://docs.gradle.org/6.8/release-notes.html#central-declaration-of-repositories Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
At first I was a bit reluctant to add support in the GradleInspector (you could still use the legacy Gradle analyzer) for such old Gradle versions, but turns out this should be easy enough to fix. Please give it a try and report back, @janek64. |
Thank you for the fast feedback!
Should I create a new ticket for this issue or would it be better to attempt using the As a general question: I was assuming that it would be considered "legacy" with the introduction of the |
I've created an issue about what I believe to be the problem, as I anyway was aware of it potentially becoming a problem.
We usually discuss such things with the community in our weekly meetings. Other than that, the PR discussion and Git commit history is a good reference.
In general, prefer the GradleInspector by now, and only fall back to the Gradle analyzer if the former does not work for you. If both do not work, probably only the GradleInspector will get fixes going forward. |
Thank you for the feedback and the hint at the additional resources/information. I will follow the strategy of preferring the GradleInspector and falling back to Gradle on errors! |
Describe the bug
I am currently experimenting with the analysis of Gradle projects that use different Gradle versions based on the new capability of setting the Java home mentioned in #8249. Currently, I want to analyse projects that use Gradle
6.x
- therefore, I am setting the Java home to a JRE 11. With Gradle6.8
, the analysis works as expected. With a lower Gradle version, such as6.7
, the analysis fails with the following exception:I quickly inspected he mentioned internal Gradle method that is not found. It seems to be present in Gradle 6.8 (https://github.com/gradle/gradle/blob/v6.8.0/subprojects/core/src/main/java/org/gradle/api/internal/SettingsInternal.java), but not in Gradle 6.7.1 (https://github.com/gradle/gradle/blob/v6.7.1/subprojects/core/src/main/java/org/gradle/api/internal/SettingsInternal.java).
It would be great to be able to analyze projects with these older Gradle versions, as they might still be used for older projects whose dependencies are still maintained,
To Reproduce
Steps to reproduce the behavior:
.ort.yml
configuration file.ort analyze -i /gradle6_7 -o /gradle6_7
Expected behavior
The dependencies of the Gradle project are correctly analysed and listed in the result.
Console / log output
Environment
Output of the
ort requirements -l commands
command:ort.yml: (in project)
Additional context
-
The text was updated successfully, but these errors were encountered: