Skip to content
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

Add gradle-dependency-graph-generator-plugin to the project #850

Merged
merged 1 commit into from
Apr 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ publish-local:
export IS_LOCAL_DEVELOPMENT=true; ./gradlew :libandroid-navigation:uploadArchives
export IS_LOCAL_DEVELOPMENT=true; ./gradlew :libandroid-navigation-ui:uploadArchives

graphs:
./gradlew :libandroid-navigation:generateDependencyGraphMapboxLibraries
./gradlew :libandroid-navigation-ui:generateDependencyGraphMapboxLibraries

dex-count:
./gradlew countDebugDexMethods
./gradlew countReleaseDexMethods
Expand Down
29 changes: 29 additions & 0 deletions gradle/dependencies-graph.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
buildscript {
repositories {
mavenCentral()
}

dependencies {
classpath pluginDependencies.dependencyGraph
}
}

import com.vanniktech.dependency.graph.generator.DependencyGraphGeneratorPlugin
import com.vanniktech.dependency.graph.generator.DependencyGraphGeneratorExtension.Generator
import com.vanniktech.dependency.graph.generator.dot.GraphFormattingOptions
import com.vanniktech.dependency.graph.generator.dot.Color
import com.vanniktech.dependency.graph.generator.dot.Shape
import com.vanniktech.dependency.graph.generator.dot.Style

plugins.apply(DependencyGraphGeneratorPlugin)

def mapboxGenerator = new Generator(
"mapboxLibraries", // Suffix for our Gradle task.
"", // Root suffix that we don't want in this case.
{ dependency -> dependency.getModuleGroup().startsWith("com.mapbox.mapboxsdk") }, // Only want Mapbox libs.
{ dependency -> true }, // Include transitive dependencies.
)

dependencyGraphGenerator {
generators = [mapboxGenerator]
}
30 changes: 16 additions & 14 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ ext {
]

pluginVersion = [
checkstyle: '8.2',
pmd : '5.8.1',
jacoco : '0.7.9',
errorprone: '0.0.13',
coveralls : '2.8.1',
spotbugs : '1.3',
sonarqube : '2.6-rc1',
gradle : '3.0.1'
checkstyle : '8.2',
pmd : '5.8.1',
jacoco : '0.7.9',
errorprone : '0.0.13',
coveralls : '2.8.1',
spotbugs : '1.3',
sonarqube : '2.6-rc1',
gradle : '3.0.1',
dependencyGraph: '0.3.0'
]

dependenciesList = [
Expand Down Expand Up @@ -104,11 +105,12 @@ ext {
]

pluginDependencies = [
gradle : "com.android.tools.build:gradle:${pluginVersion.gradle}",
checkstyle: "com.puppycrawl.tools:checkstyle:${pluginVersion.checkstyle}",
spotbugs : "gradle.plugin.com.github.spotbugs:gradlePlugin:${pluginVersion.spotbugs}",
sonarqube : "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:${pluginVersion.sonarqube}",
coveralls : "org.kt3k.gradle.plugin:coveralls-gradle-plugin:${pluginVersion.coveralls}",
errorprone: "net.ltgt.gradle:gradle-errorprone-plugin:${pluginVersion.errorprone}"
gradle : "com.android.tools.build:gradle:${pluginVersion.gradle}",
checkstyle : "com.puppycrawl.tools:checkstyle:${pluginVersion.checkstyle}",
spotbugs : "gradle.plugin.com.github.spotbugs:gradlePlugin:${pluginVersion.spotbugs}",
sonarqube : "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:${pluginVersion.sonarqube}",
coveralls : "org.kt3k.gradle.plugin:coveralls-gradle-plugin:${pluginVersion.coveralls}",
errorprone : "net.ltgt.gradle:gradle-errorprone-plugin:${pluginVersion.errorprone}",
dependencyGraph: "com.vanniktech:gradle-dependency-graph-generator-plugin:${pluginVersion.dependencyGraph}"
]
}
1 change: 1 addition & 0 deletions libandroid-navigation-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dependency-graph-mapbox-libraries.png
3 changes: 2 additions & 1 deletion libandroid-navigation-ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@ dependencies {
apply from: 'javadoc.gradle'
apply from: "${rootDir}/gradle/mvn-push-android.gradle"
apply from: "${rootDir}/gradle/checkstyle.gradle"
apply from: "${rootDir}/gradle/jacoco.gradle"
apply from: "${rootDir}/gradle/jacoco.gradle"
apply from: "${rootDir}/gradle/dependencies-graph.gradle"
1 change: 1 addition & 0 deletions libandroid-navigation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dependency-graph-mapbox-libraries.png
1 change: 1 addition & 0 deletions libandroid-navigation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ apply from: 'javadoc.gradle'
apply from: "${rootDir}/gradle/mvn-push-android.gradle"
apply from: "${rootDir}/gradle/checkstyle.gradle"
apply from: "${rootDir}/gradle/jacoco.gradle"
apply from: "${rootDir}/gradle/dependencies-graph.gradle"