Nested projects with GradleFx

kvonroeder's Avatar


13 Apr, 2013 12:25 AM

Hi folks,
I've got a project structure that looks like this:

__\ Lib
__\ Core
_\ Component

Core is a project that compiles into a SWC.
Component is a project that compiles into a SWC.

However, doing include 'lib:core:component' gets me an error because lib has no build.gradle and therefore no type. Is it possible to include a buildfile that doesn't live immediately below the root dir?

  1. Support Staff 1 Posted by Yennick Trevels on 13 Apr, 2013 07:45 AM

    Yennick Trevels's Avatar

    Yes, you can have a build file right under the root to specify the general configuration and then you can also create a build file under each subdirectory (for the subprojects).

    For more information on multi-project builds you can have a look here:

    And here's an example of a multiproject with GradleFx:

  2. 2 Posted by kvonroeder on 13 Apr, 2013 09:33 AM

    kvonroeder's Avatar

    Thanks for the response, but the goal is to actually hit doubly nested folders.

    So I have root\source\lib\core and root\source\lib\component

    I have a build.gradle in root. And a build.gradle in core. I don't want to have a build.gradle in lib\ or in source\, because it doesn't make much sense. Unfortunately unless I have a build.gradle in lib with a type AND in source with a type, I get a gradleFX error.

    Does that clarify the problem I'm hitting?

  3. Support Staff 3 Posted by Yennick Trevels on 13 Apr, 2013 10:21 AM

    Yennick Trevels's Avatar

    Oh ok, I misunderstood the question :)

    You can do this by specifying this in your settings.gradle file:

    include 'source-lib-core'
    project(':source-lib-core').projectDir = new File(settingsDir, 'source/lib/core')

    So you basically define the location of the project yourself.

    PS: You're working for Riot Games? Cool ;)

  4. 4 Posted by kvonroeder on 13 Apr, 2013 10:33 AM

    kvonroeder's Avatar

    I am indeed. Do you have an IM or email I could contact you at? Working through some of this stuff and keep bumping into silly little errors as I'm trying to get my head around Gradle as an ecosystem :)

  5. Support Staff 5 Posted by Yennick Trevels on 13 Apr, 2013 10:46 AM

    Yennick Trevels's Avatar

    You can contact me at yennick.trevels @ gmail . com (both e-mail and chat)

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac