I would like to integrate GitHub Scala Libraries with IntelliJ IDEA. Please guide me how to integrate libraries with this jetbrain IDE.
Asked
Active
Viewed 540 times
0
-
What do you mean by 'integrate'? Do you want to use them in a project? You know that IntelliJ IDEA supports sbt build files, and sbt supports both regular libraries published to a Maven repository, or direct links to git repositories such as those hosted on GitHub? – 0__ Dec 12 '15 at 21:48
-
yeah!!But, I am new to this IDE. I dont know how to include them in IntelliJ IDEA. can you give a link or procedure. – karthick Dec 12 '15 at 21:56
1 Answers
0
If you can come up with an sbt build file for your project that includes those libraries, all you have to do is open the project in IntelliJ IDEA - File > Open and select the directory in which the build.sbt
file resides, then you will be offered to import a project from the existing sbt build file.
Your minimal project directory will be
project/build.properties
sbt.version=0.13.9
src/main/scala/mypackage
Directory where your source code goes
build.sbt
scalaVersion := "2.11.7"
// example library from Maven Central
libraryDependencies += "org.scala-lang.modules" % "scala-swing_2.11" % "1.0.2"
Or, for source repository that is not published:
build.sbt
lazy val root = Project("root", file("."))
.dependsOn(libOnGitHub)
.settings(
scalaVersion := "2.11.7"
)
// example project on GitHub
lazy val libOnGitHub =
ProjectRef(uri("git://github.com/user/repo.git#branch"), "project-name")
(This requires that the project is built by sbt, too)

0__
- 66,707
- 21
- 171
- 266