There seems to be a difference in the way Android Gradle products and Java 
Gradle projects resolve Ivy dependencies of type 'bundle'. It looks like 
dependencies of type 'bundle' are not added to the classpath at compile 
time. This differs from the default behavior in default Gradle builds where 
these dependencies are added.

I've set up the following repo to illustrate:
https://github.com/jjsoa1/TestAndroidResolve

SampleAndroid is an Android Gradle project. SampleGradle is a Java Gradle 
project. Both set compile dependencies on 'com.foo:sample:1.0' in the 
provided ivy repo. SampleGradle compiles properly with './gradlew build' 
while SampleAndroid fails with the following:

 error: package com.foo does not exist
import com.foo.Foo;
              ^
1 error
:app:compileDebugJava FAILED


The issue appears to be in the following file:
https://android.googlesource.com/platform/tools/base/+/master/build-system/gradle-core/src/main/groovy/com/android/build/gradle/internal/DependencyManager.java
Lines 794 - 901

Ivy dependencies of type 'bundle' with 'jar' as the extension are ignored.

Is this difference in behavior desired?


-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to