How can i include external source?
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')
}
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
Support Staff 1 Posted by Maxime Cowez on 22 Oct, 2014 11:01 PM
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:
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.
Support Staff 2 Posted by Yennick Trevels on 23 Oct, 2014 06:23 AM
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:
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 Posted by Alessandro on 23 Oct, 2014 08:05 AM
Thanks!
Alessandro closed this discussion on 24 Oct, 2014 10:42 AM.