Slackbot
01/26/2024, 11:50 AMPhilip W
01/26/2024, 1:44 PMMartin
01/26/2024, 1:45 PMproject.rootDir as an @Internal property?Martin
01/26/2024, 1:46 PM// Path to the project directory, internal to make the cache relocatable
@get:Internal
var rootDir: String? = null
?Martin
01/26/2024, 1:47 PMrootDir is not what I want because the normalized path is computed relative the "roots" of the file collection, not rootDir , see also https://gradle-community.slack.com/archives/CA745PZHN/p1705335182134659Philip W
01/26/2024, 1:48 PMMartin
01/26/2024, 1:49 PMMartin
01/26/2024, 1:51 PMMartin
01/26/2024, 1:51 PMfileCollection.roots() would work too and I could compute the normalized path myselfPhilip W
01/26/2024, 1:52 PMFileCollection.asFileTree?Martin
01/26/2024, 1:53 PMPhilip W
01/26/2024, 1:55 PMMartin
01/26/2024, 1:56 PMFileTree it's all about iterating filesPhilip W
01/26/2024, 2:02 PMMartin
01/26/2024, 2:03 PMval files = project.files()
files.from(fileTree("dir1"), fileTree("dir2"))
println(files.asFileTree.asPath) // "dir1/a.txt:dir2/b.txt"Martin
01/26/2024, 2:15 PM