在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):vanniktech/gradle-dependency-graph-generator-plugin开源软件地址(OpenSource Url):https://github.com/vanniktech/gradle-dependency-graph-generator-plugin开源编程语言(OpenSource Language):Kotlin 98.4%开源软件介绍(OpenSource Introduction):gradle-dependency-graph-generator-pluginGradle plugin that lets you visualize your dependencies in a graph. Set upGradle 3.3 or higher is required. buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "com.vanniktech:gradle-dependency-graph-generator-plugin:0.7.0"
}
}
apply plugin: "com.vanniktech.dependency.graph.generator" Note that this plugin can be applied at the root of the project or at a specific project. Both cases will just work. Snapshotbuildscript {
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
classpath "com.vanniktech:gradle-dependency-graph-generator-plugin:0.8.0-SNAPSHOT"
}
}
apply plugin: "com.vanniktech.dependency.graph.generator" UsageBy default, this plugin provides two reporting tasks: Source project: vanniktech/Emoji The graphs are generated in There are extension points to be able to generate graphs which only include some dependencies and their transitive ones. The trick is to hook a Generator in over the Generator ExampleWe only want to show which Jetbrains libraries we're using. import com.vanniktech.dependency.graph.generator.DependencyGraphGeneratorPlugin
import guru.nidi.graphviz.attribute.Color
import guru.nidi.graphviz.attribute.Style
plugins.apply(DependencyGraphGeneratorPlugin)
dependencyGraphGenerator {
generators {
jetbrainsLibraries {
include = { dependency -> dependency.getModuleGroup().startsWith("org.jetbrains") } // Only want Jetbrains.
children = { true } // Include transitive dependencies.
dependencyNode = { node, dependency -> node.add(Style.FILLED, Color.rgb("#AF1DF5")) } // Give them some color.
}
}
} The same can be done using Kotlinimport com.vanniktech.dependency.graph.generator.DependencyGraphGeneratorPlugin
import guru.nidi.graphviz.attribute.Color
import guru.nidi.graphviz.attribute.Style
rootProject.plugins.apply(DependencyGraphGeneratorPlugin::class.java)
rootProject.configure<DependencyGraphGeneratorExtension> {
generators.create("jetbrainsLibraries") {
include = { dependency -> dependency.moduleGroup.startsWith("org.jetbrains") } // Only want Jetbrains.
children = { true } // Include transitive dependencies.
dependencyNode = { node, dependency -> node.add(Style.FILLED, Color.rgb("#AF1DF5")) } // Give them some color.
}
} This will generate a new task LicenseCopyright (C) 2018 Vanniktech - Niklas Baudy Licensed under the Apache License, Version 2.0 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论