How can I use `project.relativePath(regularFile): ...
# community-support
z
How can I use
project.relativePath(regularFile): String
in a configuration cache compatible way?
So I have:
Copy code
// in my subproject
val rootProjectLayout: ProjectLayout = project.rootProject.layout

// points to a file like: `rootProjectDir/coverage/build/reports/jacoco/buildConfigConstantsReport/html/index.html`
val regularFileProperty: RegularFileProperty
I need to return
coverage/build/reports/jacoco/buildConfigConstantsReport/html/index.html
as a
String
from that
RegularFile
there’s
org.gradle.api.internal.file.FileOperations#relativePath
- but it’s
internal
j
❤️ 1