Reputation: 1606
I've read through the SBT Documentation but am unable to find a proper answer for projects without Build.scala. This is a pure java based project.
Here is my build.sbt file -
name := """newproject"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.11.1"
libraryDependencies ++= Seq(
javaJdbc,
javaEbean,
cache,
javaWs,
"com.google.code.gson" % "gson" % "2.2.4"
)
When I run make, everything compiles and resolves as expected but when I try to use Gson in my project, I get cannot find symbol. Manually importing "com.google.code.gson" doesn't work either.
I'm looking for a way to use Managed Dependencies and not Unmanaged (referring to this post). Could someone please point me in the right direction? Is there a way I can have define App Dependencies without Build.scala?
Update -
I'm using IntelliJ and I can see com.google.code.gson in External Libraries. I tried to re-sync the project and invalidating the cache.
Upvotes: 0
Views: 1426
Reputation: 8202
Did you restart Play, or use the reload
command after updating build.sbt
?
Additionally, if you're using an IDE, you'll need to re-generate the IDE files to include a reference to GSON. If you're using IntelliJ, use the idea
command; for Eclipse, it's eclipse
.
Upvotes: 1