This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
78 lines (59 loc) · 2.27 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
ThisBuild / ideaBuild := "191.7479.19"
// Download the IDEA SDK on startup
onLoad in Global := ((s: State) => { "updateIdea" :: s}) compose (onLoad in Global).value
lazy val commonSettings = Seq(
scalaSource in Compile := baseDirectory.value / "src",
scalaSource in Test := baseDirectory.value / "test",
javaSource in Compile := baseDirectory.value / "src",
javaSource in Test := baseDirectory.value / "test",
resourceDirectory in Compile := baseDirectory.value / "resources",
resourceDirectory in Test := baseDirectory.value / "test-resources",
scalaVersion := "2.12.8",
scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-unchecked"
),
javacOptions ++= Seq(
"-Xlint:deprecation"
),
mainClass in (Compile, run) := Some("com.intellij.idea.Main"),
fork in run := true,
javaOptions in run := Seq(
"-ea", // enable Java assertions
s"-Didea.home.path=${ideaBaseDirectory.value}"
)
)
name := "codacy-meta-intellij"
version := "0.1-SNAPSHOT"
lazy val root = (project in file(".")).
aggregate(codacymetaIntellij)
lazy val codacymetaIntellij = (project in file("codacy-meta-intellij")).
enablePlugins(SbtIdeaPlugin).
settings(commonSettings).
settings(
name := "codacy-meta-intellij",
ideaPluginName := "codacymetaIntellij",
description := "Run Codacy Scalameta inspections on Scala code",
ideaInternalPlugins := Seq(
"IntelliLang",
),
ideaExternalPlugins +=
IdeaPlugin.Zip("Scala", url("https://plugins.jetbrains.com/files/1347/61993/scala-intellij-bin-2019.1.8.zip")),
Compile/unmanagedClasspath ++=
Option((baseDirectory.value / "lib").listFiles()).toList.flatMap(_.toList),
packageFileMappings ++=
Option((baseDirectory.value / "lib").listFiles()).toList.flatMap(_.toSeq)
.map(f => (f, "lib/" + f.getName())),
packageLibraryMappings ++= Seq(
"org.scalameta" %% ".*" % "4.0.0" -> Some("lib/scalameta.jar")
),
libraryDependencies ++= Seq(
"com.codacy" %% "codacy-plugins-api" % "3.0.96",
"com.codacy" %% "codacy-engine-scala-seed" % "3.0.168",
"org.scalameta" %% "scalameta" % "4.0.0"
),
ideaFullJars := {
ideaFullJars.value.filter(af => !af.data.getName().startsWith("scalameta"))
}
)