cannot add file dependencies to my build file
Hi
What is the best way to add file dependencies to my project build file? I tried to add the following lines to build.gradle
dependencies {
compile files('libs/VAComboBox.swc')
//compile fileTree(dir: 'libs', include: '*.swc')
}
but instead of adding the dependencies to my project swf I got the following error messages.
11:35:45.628 [ERROR] [org.gradle.BuildExceptionReporter] Cause:
Could not find method compile() for arguments [file collection] on
root project 'myproject'.
11:35:45.629 [ERROR] [org.gradle.BuildExceptionReporter]
11:35:45.629 [ERROR] [org.gradle.BuildExceptionReporter] *
Exception is:
11:35:45.630 [ERROR] [org.gradle.BuildExceptionReporter]
org.gradle.api.GradleScriptException: A problem occurred evaluating
root project 'myproject'.
11:35:45.631 [ERROR] [org.gradle.BuildExceptionReporter] at
org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
thanks
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 Yennick Trevels on 31 Jan, 2012 06:46 PM
Hi Matt,
You are using the wrong configuration for the dependency.
You have to use one of the following configurations: merged, internal, external or rsl
'merged' and 'external' are the most used ones. The 'external' configuration is mostly used in library projects which compile to a swc, because it excludes the dependencies from the final swc. The 'merged' configuration is mostly used in a real application because it includes the dependencies in your final swf.
an example:
dependencies {
}
You can read more about dependency management in GradleFx here: https://github.com/GradleFx/GradleFx/wiki/Dependency-management
Hope this helps :-)
Yennick Trevels closed this discussion on 04 Mar, 2012 10:35 AM.