magibney commented on a change in pull request #304:
URL: https://github.com/apache/solr/pull/304#discussion_r727418306
##########
File path: gradle/validation/validate-source-patterns.gradle
##########
@@ -120,6 +120,7 @@ configure(rootProject) {
// default excludes.
exclude '**/build/**'
+ exclude '**/.idea/**'
Review comment:
This line was recently removed as part of
0f56b9caafcf5be57752a1136c9725473b179099 ... is the reintroduction here
intentional? I'm just curious, not sure one way or the other wrt the
significance of this change.
##########
File path: gradle/lucene-dev/lucene-dev-repo-composite.gradle
##########
@@ -82,7 +83,7 @@ if (propertyValue != null) {
logger.lifecycle("Local Lucene development repository has been detected
but won't be used.")
}
} else {
- luceneDevRepo = file("${propertyValue}").absoluteFile
+ luceneDevRepo =
file(rootDir).toPath().resolve(propertyValue).normalize().toFile()
Review comment:
Indeed, for me `file("${propertyValue}")` was definitely resolving
relative to `"${rootDir}/gradle/"`. I'm not that familiar with the idiomatic
gradle way to do this (hence the introduction of the Java API), but if there's
a better way to do it I'm all for it!
I tried `rootProject.file("${propertyValue}")`, and got an error:
```
> No signature of method:
org.gradle.initialization.DefaultProjectDescriptor.file() is applicable for
argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [../lucene]
```
It looks like at the `configuringSettings` phase (when rootProject is a
`DefaultProjectDescriptor`), the `.file()` method is not available as an
instance method on `rootProject`. I verified that at _build_ time
(`configuringSettings==false`), `rootProject.file("${propertyValue}")` works as
expected.
What would you suggest as the best way forward?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]