magibney commented on a change in pull request #304:
URL: https://github.com/apache/solr/pull/304#discussion_r728128557



##########
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to