How can i include external source?

Alessandro's Avatar

Alessandro

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

/lib/src
/project1/src/

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: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c...

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

    Alessandro's Avatar

    Thanks!

  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

Generic

? 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

21 Jun, 2017 06:38 AM
10 Jun, 2017 04:16 PM
24 Mar, 2017 07:10 PM
19 Mar, 2017 04:39 AM
22 Jan, 2017 07:46 AM

 

11 Oct, 2016 01:18 PM
20 Sep, 2016 04:36 PM
06 Sep, 2016 08:05 PM
03 Aug, 2016 11:15 AM
01 Jun, 2016 05:20 PM
03 May, 2016 09:17 PM