> Question
Hi Xavier Ducrohet,
Thanks a lot for your response, but I'm still confused. Could you please
help me
again? Thanks a lot. My question is, for example:
If I want to build apk without referencing one jar(ex:XXX.jar), I can't use
compile" dependency because the XXX.jar will also be packaged into apk if
using "compile files('XXX.jar')".
I've tried to use "runtime" dependency, but this will get the error called
"Could not find method runtime() for arguments"
Finally, I know "android" plugin doesn't support "runtime" dependency.
After searching from google, I should use my own dependency, called "provided".
Then my build.gradle will be:
configurations {
provided
}
dependencies {
provided files('libs/jarSample.jar')
}
android.applicationVariants.each { variant ->
variant.javaCompile.classpath += configurations.provided
}
After building, I will get the apk without jarSample.jar be packaged.
Finally, my question is:
(1)How do I know which dependency is supported by "android" plugin?
(2)I don't really know what "variant.javaCompile.classpath" stands for.
Could you please help me? Thanks a lot.
androidplugin seems not supporting runtime dependencies,
> > which BTW is not a problem when i was using Eclipse to develop or use
> Android.mk to compile with source code build system.
> >
> >
> > i'm trying to do this.
> >
> >
> >
> > buildscript { .......}apply plugin: 'android'dependencies { compile
> fileTree(dir: 'libs', include: '*.jar') runtime
> file('lib/pluginapi.jar')}android { ......}
> >
> > when i compile with 'gradle build', i got below error:
> >
> >
> >
> >
> > A problem occurred evaluating root project 'XXXXX'.> Could not find method
> runtime() for arguments [C:\Work\Android\workspace\XXXXX\lib\pluginapi.jar]
> on root project 'XXXXX'.* Try:Run with --stacktrace option to get the
stacktrace. Run with --info or --debug option to get more log output.
> >
> >
> >
> > I don't think runtime dependency is meaningless for Android, sometimes, we
> need to use this feature.
> >
> > Thanks much for your feedback!
> >
> >
> >
> >
> Hi all,
> I'm new to Gradle, I don't know how to find the entrance to propose a new
> problem, thus, I would like to ask one question about plugin-dependencies
> like this.
> Could someone give me some directions? Thanks a lot
> My question is:
> (1)What the dependency which "android" plugin have?
> It's because I've had many times "try-and-error" to use runtime
> dependency configuration in "android" plugin, and finally find the "runtime"
> is only supported in "java" plugin.
> Is there any document to find which dependency configuration is supported?
> Thanks a lot for your great help.
>
> --
> 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 adt-dev+unsubscribe <at>
googlegroups.com.
Inc.
http://developer.android.com |
http://tools.android.comPlease do not