Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3693960
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:26:22+00:00 2026-05-19T04:26:22+00:00

Maybe I’m missing something about the way Gradle works. What I have here is

  • 0

Maybe I’m missing something about the way Gradle works. What I have here is a parent project, which only contains configuration, i.e. there won’t be any artifact being built when building it, it merely manages and builds all its subprojects.

Now the subprojects share some dependency configuration, so I figured what I would do in the root project’s build.gradle is:

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

that, however, does not work, it fails with a rather obscure error message:

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)

after some trial and error, I could “fix” this issue by applying the ‘java’ plugin to the parent project.

How come? I don’t see anywhere from the Gradle docs that a fileTree dependency requires the Java plugin. Even so, why would I need it on the project that is injecting the configuration, as opposed to on the project that is being configured (note that the subprojects all apply the Java plugin themselves)?

Does this mean that if I have N different subprojects that are all of varying natures, and apply different plugins, that the parent projects must always apply the set of all plugins beings used somewhere to itself, too?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:26:22+00:00Added an answer on May 19, 2026 at 4:26 am

    It is not the fileTree that requires ‘java’ plugin.

    The error message is complaining about undefined compile dependency configuration. Java plugin defines this configuration for you, so that you can add dependencies (including your fileTree) to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Maybe this is something I am just missing, but is there any way to
Maybe I'm missing something here, but array_diff() seems to be leaving me empty kesys
Maybe I'm missing something obvious, or maybe something sinister is happening, but this seems
Maybe a silly question but here goes anyway. Example: Let's say I have one
Maybe I'm missing something but why does visual studio break execution to tell me
Maybe it's too late in Germany (1:04AM) or maybe I'm missing something... How can
Maybe here is already such question, but I didn't find it. I have MVVM
Maybe I'm attempting to do something that isn't possible, or I'm missing something completely
Maybe I am missing something, but they seem similar. If you use for example...
maybe it's dumb but is there a difference between new Something().method(); and Something tmpSomething

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.