0

I have 2 gradle projects A and B

In project A I have

dependencies {
    ext {
        support_library_version = '26.1.0'
    }
    implementation "com.payu.india:payu-sdk:4.4.1"
    implementation "com.payu.magicretry:magicretry:1.0.4"
    implementation "com.payu.custombrowser:payu-custom-browser:6.1.1"
    implementation "com.android.support:appcompat-v7:${support_library_version}"
    implementation "com.android.support:support-v4:${support_library_version}"
}

In project B I have

implementation project(':A')

For some reason project B reports unable to find symbol for all com.payu.* imports.

After I upgraded gradle to 4.4 I had to copy all the needed implementation from project A to project B. What am I missing ?

Siddharth
  • 9,349
  • 16
  • 86
  • 148

1 Answers1

0

2 Answers posted on gradle issues here.

1

This doing exactly what it's supposed to. That's the difference between the api and implementation dependencies when you use the java-library plugin:

implementation dependencies are "internal", so do not leak to downstream consumers api dependencies are, on the other hand, exposed transitively because they participate in the API surface So either you need to add an explicit implementation dependency on A, to explain that you too need the dependencies, or they should be using api. We cannot determine it automatically for you.

2

As the name says, implementation dependencies are implementation details and are not available for downstream projects to compile against. If a dependency should be part of your api, you should use the api configuration

Siddharth
  • 9,349
  • 16
  • 86
  • 148