Using utility as a library¶
This utility is also published as a maven artifact on Maven Central so that you can make use of it as you want to use it (For example: automation in CI).
Declare the following dependencies in the project:
Refer to the latest release on GitHub Releases or maven central:
// Create a report specification with application name val reportSpec = ReportSpec( name = "Your Application Name", options = ReportOptions() // Customize it as per need ) // Get provider for raw reports (generated by compose compiler) val rawReportProvider = ComposeCompilerRawReportProvider.FromDirectory("path/to/raw-reports") // Provide metric files to generator val htmlGenerator = HtmlReportGenerator( reportSpec = reportSpec, metricsProvider = ComposeCompilerMetricsProvider(rawReportProvider) ) // Generate HTML (String) val html = htmlGenerator.generateHtml()