How can i include external source?

Alessandro's Avatar


22 Oct, 2014 05:03 PM

I'm very new to Gradle and maybe the question is very easy.

I have an external lib and i dont want convert it in swc and i dont want past the lib folder inside my src.
Something like that


How can i include all files inside lib/src inside my project?

I tried without success to use inside dependencies "filetree"
dependencies {
fileTree(dir: '/lib/src/', include: '*.as')

  1. Support Staff 1 Posted by Maxime Cowez on 22 Oct, 2014 11:01 PM

    Maxime Cowez's Avatar

    The answer to this is not directly related to gradle, but more to the Flex compiler. If you use dependencies you're inherently referencing a library. The dependency scopes we use for GradleFx all translate to a Flex compiler flag that only expects a swc.

    So your only option is to consider these files sources and configure them as such:

    srcDirs = [‘project1/src/’, 'lib/src' ]
    You can't use absolute paths here however.

    To tell you the truth, I don't really understand why you don't want to compile the library into - well - a library artifact (a swc). It would make this much easier and logical. Have a look at our multi-project examples on GitHub.

  2. Support Staff 2 Posted by Yennick Trevels on 23 Oct, 2014 06:23 AM

    Yennick Trevels's Avatar

    I would recommend to follow Maxime's answer, but if that isn't an option or doesn't solve your specific issue then there's also the includeSources property:

    includeSources = [...]

    This is similar to the include-sources compiler option, for which you can find the explanation here:

  3. 3 Posted by Alessandro on 23 Oct, 2014 08:05 AM

    Alessandro's Avatar


  4. Alessandro closed this discussion on 24 Oct, 2014 10:42 AM.

Comments are currently closed for this discussion. You can start a new one.

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

Recent Discussions

07 May, 2023 04:17 PM
28 Apr, 2023 11:22 PM
23 Apr, 2023 09:43 AM
03 Nov, 2022 01:22 AM
29 Jun, 2022 05:39 PM


04 Aug, 2021 12:50 PM
15 Apr, 2021 06:10 PM
15 Jan, 2021 06:56 PM
09 Mar, 2020 11:11 PM
09 Mar, 2020 11:09 PM
17 Apr, 2019 02:51 PM