English 中文(简体)
零散失能使用档案进入次级项目 树木
原标题:Gradle fails injecting dependencies into subprojects using fileTree

Maybe I m 缺少有关格拉斯工程方式的内容。 我在这里所看到的只是一个家长项目,该项目仅包括组合,即,在建造时,打上了任何手工艺,它只是管理和建设其所有次级项目。

既然次级项目具有某种依赖性配置,那么我就知道我会在根本项目建设中做些什么。 梯度为:

subprojects {
  dependencies {
    compile fileTree(dir:  lib , includes: [ *.jar ])
  }    
}

然而,它没有发挥作用,它没有发出一个相当模糊的错误信息:

A problem occurred evaluating root project qype-android Cause: No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.compile() is applicable for argument types: (org.gradle.api.internal.file.DefaultConfigurableFileTree) values: [file set lib ] Possible solutions: module(java.lang.Object)

在经过一些审判和错误之后,我可以“通过应用母体项目解决该问题”。

如何? 我看不到从格拉门口看的任何东西:fileTree Depend要求 Java plugin。 即便如此,我为什么需要把配置放在项目上,而不是在正在配置的项目上(指出次级项目都适用 Java的原始项目)?

这是否意味着,如果我有所有性质不同的N级次级项目,并且适用不同的原始项目,那么母项目必须始终适用all pluginssssssss,有些地方用于自己?

最佳回答

页: 1 树,要求 j。

错误信息是关于未定义的<代码>compile依赖配置的抱怨。 Java plugin为你界定了这一配置,以便你能够增加(包括你的档案)。

问题回答

暂无回答




相关问题
How to Inject Open Connections with an IoC

First, my scenario. I have a service, BillingService, has a constructor like this: BillingService(IInstallmentService, IBillingRepository) The InstallmentService has a constructor that looks like ...

Using the Ninject kernel as a Unit of Work object factory

So I m starting to use Ninject for dependency injection and I m wondering what people think of using a kernel as an object factory for Unit of Work type objects like Linq2Sql Datacontexts. I would ...

array dependency injection in spring?

is there a way to use dependency injection to inject all available implementations of a specific interface in spring? This is kind of the same thing as asked here for .NET. Though my aim is to use @...

Unity constructors

I have setup unity in my project and it is working for objects that don t have constructor injection implemented on them. The issue is now I do have an object which requires a custom object as a ...

Grails Packaging and Naming Conventions

Packaging Controllers, Services,etc. i.e. - com.company.controllers - com.company.services Is this a good practice or should be avoided by all means?? Another worth mentioning problem I encountered ...

ASP.NET MVP Injecting Service Dependency

I have an ASP.NET page that implements my view and creates the presenter in the page constuctor. Phil Haack s post providing was used as the starting point, and I ll just the examples from the post ...

Authorization and Windsor

I m trying to implement my custom authorize attribute like: public class MyCustomAuth : AuthorizeAttribute { private readonly IUserService _userService; public MyCustomAuth(IUserService ...

热门标签