admin管理员组

文章数量:1289541

I would like to find all build.gradle.kts files where the dependency {} block uses the file or fileTree methods to depend on particular files.

My SourceGraph query looks like this:

context:global file:build.gradle.kts dependency\s*\{[^\}]*file[^\}]*\}

:global+file:build.gradle.kts+dependency%5Cs*%5C%7B%5B%5E%5C%7D%5D*file%5B%5E%5C%7D%5D*%5C%7D&patternType=regexp&sm=0

but it does not yield any good results, just two false ones, which I don't even see being related to my query. Even if I change file to implementation inside, which is an absolutely common thing to use within the dependency block.

What is the correct way to phrase this query? (Maybe even by using structured search if needed)

本文标签: Sourcegraph query to match file or fileTree dependencies in Gradle buildsStack Overflow