Reports directory variable

There were failing tests. See the report at: file:///G:/DWork/osource/spring-boot/archunit/build/reports/tests/test/index.html

Which is the variable that I can use to know the location of this file… I don’t want to hardcode this file name with $buildDir/reports/tests/test/index.html

from the project you can use reportsDir

Project (Gradle API 7.5) which has the directory of the reports

for the report file it self task that create report use this type Report - Gradle DSL Version 7.5

which has name property that has the file name

hope that help and have a nice day :slight_smile:

1 Like

Yes @justsoomeone… it is

test.reports.html.destination is the directory

hence using

Desktop.getDesktop().browse(new File(test.reports.html.destination, "index.html").toURI())
1 Like

Almost, test.reports.html.entryPoint is what you are after, that is directly the html page to display