Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Adds gradle-dependency-graph-generator-plugin to the project #671

Merged
merged 4 commits into from
Apr 10, 2018

Conversation

zugaldia
Copy link
Member

@zugaldia zugaldia commented Apr 5, 2018

This helps us visualize the dependency tree for Mapbox dependencies. To generate the chart, run the following Gradle task:

$ ./gradlew generateDependencyGraphMapboxLibraries

Graphviz needs to be installed following the instructions on the plugin README.

cc: @langsmith @Guardiola31337

@@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'com.github.triplet.play'
apply from: "$project.rootDir/gradle/script-git-version.gradle"
apply from: "$project.rootDir/gradle/graph.gradle"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to understand in a glance what the plugin does, what about calling it dependencies-graph.gradle instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to gradle-dependencies-graph.gradle. Looks like the Maps SDK likes prefixing all scripts with gradle-.

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") }, // Only want Mapbox libs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our GROUP is com.mapbox.mapboxsdk. Shouldn't we use the complete group here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed, although it doesn't have an effect in the check.

}

dependencies {
classpath "com.vanniktech:gradle-dependency-graph-generator-plugin:0.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency we should add this dependency in the dependencies.gradle file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same approach script-git-version.gradle follows. If we're gonna change one script for consistency, we should change them all - feel free to cut a separate ticket.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow up ticket 👉 #676

Copy link
Member

@tobrun tobrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add integration inside the makefile?

@zugaldia
Copy link
Member Author

zugaldia commented Apr 9, 2018

@Guardiola31337 @tobrun Ready for another round of 👀 .

Copy link
Contributor

@Guardiola31337 Guardiola31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After getting ✅ from CI, :shipit:

@zugaldia zugaldia merged commit c1825dd into master Apr 10, 2018
@zugaldia zugaldia deleted the az-graph branch April 10, 2018 14:08
zugaldia added a commit to mapbox/mapbox-gl-native that referenced this pull request Apr 10, 2018
…oject (#11603)

* adds gradle-dependency-graph-generator-plugin to the project

* keep script in sync with mapbox/mapbox-android-demo#671

* adds a makefile rule for dependency generation
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants