This repository was archived by the owner on Sep 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.sbt
More file actions
76 lines (68 loc) · 3.05 KB
/
build.sbt
File metadata and controls
76 lines (68 loc) · 3.05 KB
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
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Keys.{resolvers, `package` => packageTask}
Global / onChangedBuildSource := ReloadOnSourceChanges
import sbt.Resolver
val flowframeVersion = "0.1-SNAPSHOT"
lazy val commonSettings = Seq(
version := flowframeVersion,
scalaVersion := "2.11.12",
autoCompilerPlugins := true,
resolvers += Resolver.mavenLocal
)
autoCompilerPlugins := true
resolvers ++= Seq(
"Facebook Nexus internal releases" at "https://maven.thefacebook.com/nexus/content/repositories/releases",
"Facebook Nexus lib releases" at "https://maven.thefacebook.com/nexus/content/repositories/libs-releases-local",
"Facebook Nexus internal snapshots" at "https://maven.thefacebook.com/nexus/content/repositories/snapshots",
"Facebook Nexus lib snapshots" at "https://maven.thefacebook.com/nexus/content/repositories/libs-snapshots-local",
"Facebook Nexus public" at "https://maven.thefacebook.com/nexus/content/groups/public"
)
lazy val plugin = project
.settings(commonSettings: _*)
.settings(
name := "flowframe",
version := flowframeVersion,
scalaVersion := "2.11.12",
organization := "com.facebook",
crossVersion := CrossVersion.full, // compiler api needs full version match
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value,
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value,
libraryDependencies += "org.scalatestplus" %% "scalacheck-1-15" % "3.3.0.0-SNAP3" % Test,
libraryDependencies += "org.scalatest" %% "scalatest-propspec" % "3.3.0-SNAP3" % "test",
libraryDependencies += "org.scalatest" %% "scalatest-matchers-core" % "3.3.0-SNAP3" % "test",
libraryDependencies += "org.scalatest" %% "scalatest-shouldmatchers" % "3.3.0-SNAP3" % "test",
) in file ("flowframe-plugin")
val pluginJar = plugin / Compile / packageTask
lazy val runtime = project
.settings(commonSettings: _*)
.settings(
Test / fork := false,
scalacOptions += s"-Xplugin:${pluginJar.value.getAbsolutePath}",
// build tests with plugin
Test/scalacOptions ++= Seq(
// enable the plugin
s"-P:flowframe:lang:purpose",
// rebuild when plugin changes
s"-Jdummy=${pluginJar.value.lastModified}",
),
Test/javaOptions += "-J-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005",
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.8" % Test,
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % "2.3.0",
"org.apache.spark" %% "spark-sql" % "2.3.0",
),
) in file ("flowframe-runtime")