-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Information about configurations in inventory report #295
Comments
Here a way to add this information by customization using Kotlin, writing configurations with "test" in their name in dark grey: class EnhancedInventoryHtmlReportRenderer : InventoryHtmlReportRenderer() {
lateinit var configurations: Set<ConfigurationData>
override fun render(data: ProjectData) {
configurations = data.configurations
super.render(data)
}
override fun printDependencyMetaInformation(group: String, name: String, version: String) {
super.printDependencyMetaInformation(group, name, version)
val configurationNames = configurations
.filter { configuration ->
configuration
.dependencies
.any { (it.group == group) && (it.name == name) && (it.version == version) }
}
.map { it.name }
.sorted()
.joinToString(
separator = "",
prefix = "<ul>",
postfix = "</ul>"
) {
if (it.contains("test", ignoreCase = true)) {
"<li style='color: darkGrey'>$it</li>"
} else {
"<li>$it</li>"
}
}
output.appendText(section("Configurations", configurationNames))
}
fun section(label: String, value: String) = """
<label>$label</label>
<div class='dependency-value'>$value</div>
""".trimIndent()
fun link(name: String, url: String) = "<a href='$url'>$name</a>"
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be nice to have information about the configurations a dependency is coming from in the inventory report.
If you for example enable
ALL
configurations, it is important to see whether a dependency is a production dependency, a test dependency, a tool dependency, ...The text was updated successfully, but these errors were encountered: