Discussion:
IDEA: Libraries not found => File dependencies not working (but Console build works)
megachucky
2012-04-20 08:47:39 UTC
Permalink
Hello,

I am new to Gradle. I added other libraries via Maven Repository, but JavaFX
is not public. So, I have used File dependencies as workaround for the
moment:

dependencies {
compile files('lib/javafx-2.0.jar')
}

lib is a local folder in my project directory. "build gradle" from console
works, but IDEA does not find the JavaFX library, and shows compile errors.
What do I have to do when using IDEA? Is there another task which I have to
call when adding new libraries?

Thank you in advance...

Best regards,
Kai



--
View this message in context: http://gradle.1045684.n5.nabble.com/IDEA-Libraries-not-found-File-dependencies-not-working-but-Console-build-works-tp5653691p5653691.html
Sent from the gradle-user mailing list archive at Nabble.com.
Peter Niederwieser
2012-04-20 09:31:54 UTC
Permalink
Depends on how you integrate with IDEA. If you use Gradle's "idea" plugin,
you'll have to execute 'gradle idea' or 'gradle cleanIdea idea'.

--
Peter Niederwieser
Principal Engineer, Gradleware
http://gradleware.com
Creator, Spock Framework
http://spockframework.org
Twitter: @pniederw

--
View this message in context: http://gradle.1045684.n5.nabble.com/IDEA-Libraries-not-found-File-dependencies-not-working-but-Console-build-works-tp5653691p5653766.html
Sent from the gradle-user mailing list archive at Nabble.com.
megachucky
2012-04-20 10:56:07 UTC
Permalink
Well, I did that. Afterwards, I also closed IDEA before and restarted it.
Still compile errors. Any other idea?

Btw: I use IDEA Ultimate 11.1.

Best regards,
Kai

--
View this message in context: http://gradle.1045684.n5.nabble.com/IDEA-Libraries-not-found-File-dependencies-not-working-but-Console-build-works-tp5653691p5653926.html
Sent from the gradle-user mailing list archive at Nabble.com.
Peter Niederwieser
2012-04-20 11:05:31 UTC
Permalink
Adding file dependencies to IDEA has always worked fine for me, and it still
does with 11.1.2. Did you make sure that the library is NOT listed under
Project Structure->Modules->(Select appropriate module)->Dependencies? Can
you post a reproducible example? Have you tried with IDEA's own Gradle
plugin?

--
Peter Niederwieser
Principal Engineer, Gradleware
http://gradleware.com
Creator, Spock Framework
http://spockframework.org
Twitter: @pniederw

--
View this message in context: http://gradle.1045684.n5.nabble.com/IDEA-Libraries-not-found-File-dependencies-not-working-but-Console-build-works-tp5653691p5653947.html
Sent from the gradle-user mailing list archive at Nabble.com.
megachucky
2012-04-23 14:02:48 UTC
Permalink
Thanks Peter,

I have removed all IDEA stuff, then imported the project via IDEA Gradle
plugin. Now it works...

Best regards,
Kai

--
View this message in context: http://gradle.1045684.n5.nabble.com/IDEA-Libraries-not-found-File-dependencies-not-working-but-Console-build-works-tp5653691p5659470.html
Sent from the gradle-user mailing list archive at Nabble.com.

Loading...