Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an Android gradle build task dependencies diagram?

Tags:

Is there an equivalent diagram to this for the Android gradle plugin? Java plugin - taskshttps://docs.gradle.org/current/userguide/java_plugin.html#N12255

like image 723
CasualT Avatar asked Jun 24 '15 17:06

CasualT


People also ask

What is build Gradle dependencies?

The Gradle build system in Android Studio makes it easy to include external binaries or other library modules to your build as dependencies. The dependencies can be located on your machine or in a remote repository, and any transitive dependencies they declare are automatically included as well.

Where does Gradle get its dependencies?

Gradle can consume dependencies available in the local Maven repository. Declaring this repository is beneficial for teams that publish to the local Maven repository with one project and consume the artifacts by Gradle in another project. Gradle stores resolved dependencies in its own cache.

How do I print a Gradle dependency tree?

Right-click on gradle task->"Dependency Tree" to print task dependencies.


2 Answers

I haven't found any diagram for Android gradle plugin, BUT I've found a way to create it for any project/library/module.

Add Inspector library to your top level gradle.build file and execute task you want to inspect. Then check ./buildProfile/report folder.

Just for instance my top level build.gradle file

buildscript {     repositories {         jcenter()         maven {             url "https://plugins.gradle.org/m2/"         }     }     dependencies {         classpath 'com.android.tools.build:gradle:1.5.0'         classpath "gradle.plugin.com.jakeout:inspector:0.3.0"     } }  allprojects {     apply plugin: "com.jakeout.gradle-inspector"     repositories {         jcenter()     } } 

Here is part of report for my simple project: Android task dependencies

P.S. Maybe, generated image is not that good as created by Gradle team, but good enough to understand dependencies in your project/library/module.

like image 91
Oleksandr Avatar answered Oct 20 '22 21:10

Oleksandr


Putting this here, because it is the closest I've found so far...but it doesn't explicitly reference the gradle tasks required to reach these steps... :(

http://tools.android.com/tech-docs/new-build-system/build-workflow

like image 26
CasualT Avatar answered Oct 20 '22 23:10

CasualT