Hi guys,
I have an android project structure like this:
Application
|
|__Library1
|
|__Library2
|
|__<multiple JARs>
So Library2 is just a container for multiple jars, it has no code itself.
The problem is that I need to compile against <multiple JARs> for
Application and Library1 but <multiple JARs> need to be excluded from the
final apk. Is there currently any way to do this using gradle with out
including <multiple JARs> in all of my projects? I have tried using
configurations.provided like in this thread:
https://groups.google.com/forum/#!topic/adt-dev/WIjtHjgoGwA but with no
success, the jars still end up in the final APK. I have my build.gradle
files set up like this
<Application>:
apply plugin: 'android'
configurations{
provided
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':Library1')
provided project(':Library2')
}
...
<Library1>:
apply plugin: 'android-library'
configurations{
provided
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
provided project(':Library2')
}
...
<Library2>:
apply plugin: 'android-library'
configurations{
provided
}
dependencies {
provided fileTree(dir: 'libs', include: '*.jar')
}
android.libraryVariants.all { variant ->
variant.javaCompile.classpath += configurations.provided
}
...
I am currently using gradle 1.12 with plugin 0.10. Any help would be
appreciated thank you very much.
--
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.