0

I have two modules, module1 (android library) and module2 (Java library).

module1 has module2 as implementation dependency.

module2 has dependency d3 which is org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2 as implementation dependency.

However, I can import symbols from d3 in a class in module1, without Android Studio complaining. (This would imply that d3 is in the classpath of module1 through some other library)

However, on compilation, build for module1 fails with error: package org.apache.oltu.oauth2.common does not exist !?

How is it able to import all symbols from that package when it is not able to resolve it in compile time?

Rajan Prasad
  • 1,582
  • 1
  • 16
  • 33

1 Answers1

0

I figured out that if the dependency graph is as such:

app (implementation dependent) moduleA
app (implementation dependent) moduleC
moduleA (implementation dependent) moduleB
moduleC (api dependent) moduleD

then symbols in moduleA, moduleC and moduleD are visible in app (as expected), but surprisingly symbols in moduleB are visible too !

However, those symbols in moduleB cannot be resolved during compilation of app (as expected) .

I am not sure whether this is a feature of Android 3.1.2 which I am using or a bug.

Rajan Prasad
  • 1,582
  • 1
  • 16
  • 33