Gradle plugn 3.0.0 - replace dependency in module for one flavor

Skip to first unread message

Tomáš Procházka

Sep 7, 2017, 11:47:58 AM9/7/17
to adt-dev

I would like to ask one question

Currently I have somethgin like this

freeCompile project(':lib-appsflyer-no-op')
paidCompile "com.appsflyer:af-android-sdk:${rootProject.ext.appsflyerLibVersion}@aar"

So I would like to use the library only in paid flavor and I'm using empty no-op implementation in free version.
How to do the same in Gradle 3.0.0

Without change it fail on 

Error:Unable to resolve dependency for ':app@freeRelease/compileClasspath': Could not resolve project :lib-appsflyer-no-op.

According the
there should be:

Migrate custom dependency resolution strategies

The plugin uses the following configurations to resolve all the dependencies of a variant:

  • <variant>CompileClasspath (_<variant>Compile no longer works)
  • <variant>RuntimeClasspath (_<variant>Apk no longer works)

but it looks like freeCompileClasspath project(':lib-appsflyer-no-op') doesn't works too :-(
Reply all
Reply to author
0 new messages