I try to run this command to list all the dependencies of firebase-messaging library :
gradlew :app:dependencyInsight --configuration compile --dependency firebase-messaging
but it's return me :
:app:dependencyInsight No dependencies matching given input were found in configuration ':app:compile'
BUILD SUCCESSFUL in 0s 1 actionable task: 1 executed
this is my build.gradle file :
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.test.myapplication"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
}
What i did wrong ?
Gradle adds the dependency to the build output only, for use during runtime. That is, it is not added to the compile classpath. This configuration is deprecated (it's available in AGP 1.0-4.2).
It means that dependency graph contains multiple dependencies with the same group and module but different versions for e.g. org.
That's because firebase-messaging
is declared in the implementation
configuration. compileClasspath
should be used
Try :
gradlew :app:dependencyInsight --configuration compileClasspath --dependency firebase-messaging
edit : using compileClasspath
won't work with Android as described here
Using gradle :app:dependencies
to fetch all dependencies seems to be the cleaner way to get all the dependencies of firebase-messaging
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With