-
Notifications
You must be signed in to change notification settings - Fork 122
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
Fix gradlew location when trying to location a gradle executable #610
Fix gradlew location when trying to location a gradle executable #610
Conversation
@@ -66,7 +66,7 @@ def executable | |||
return @executable if defined?(@executable) | |||
|
|||
@executable = begin | |||
gradlew = File.join(config.pwd, "gradlew") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For gradle multi-projects builds, the config.pwd
is often a subfolder and not the root of the project.
I think licensed should look for gradlew at the root since it is the official location for the gradle wrapper
What do you think about that ?
Could you explain this a bit more? The Otherwise, I want to caution any expectation that What do you think about adding a e.g. with the extra config value available there's quite a bit of flexibility. I don't know of any monorepos that mix gradle and go but who knows? there's probably something out there 😆 # in .licensed.yml config file
root: ../some/other/root/path
apps:
- source_path: 'path/from/root/to/gradle/lib/*'
sources:
gradle: true
- source_path: 'path/from/root/to/go/cmd/*'
sources:
go: true
gradle:
gradlew: 'path/from/root/to/gradle/gradlew' Hopefully that makes sense! |
After re-reading the changes and the command class source code, I confirm that I effectively made a false assumption that the change broke the search location for Your idea to add a new property is really good! I implemented it, let me know if there is anything else I can do 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
### Gradlew | ||
|
||
The `gradle.gradlew` property is used to determine where the `gradlew` executable is. The default location the [configuration root](../configuration/configuration_root.md). | ||
|
||
```yml | ||
gradle: | ||
- gradlew: path/from/root/to/gradle/gradlew | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ thanks for the docs update!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh 🤦 the nested gradlew
property isn't an array and shouldn't have the -
prefix. I'll fix the docs in the release PR
## 4.0.2 ### Fixed - The path to a gradlew executable can be configured when enumerating gradle dependencies (:tada: @LouisBoudreau #610)
- The path to a gradlew executable can be configured when enumerating gradle dependencies (:tada: @LouisBoudreau #610)
The #606 fix changed the search location of the
gradlew
executableAccording to the documentation the
gradlew
should be present at the root of the project :This PR therefore aims at updating where licensed searches for
gradlew