-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.sbt
129 lines (120 loc) · 3.87 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import sbt._
import Keys._
val avroVersion = "1.12.0"
val hadoopVersion = "3.4.1"
val parquetVersion = "1.14.3"
val scalatestVersion = "3.2.19"
val tensorFlowVersion = "0.5.0"
val commonSettings = Sonatype.sonatypeSettings ++ Seq(
organization := "me.lyh",
scalaVersion := "2.13.15",
crossScalaVersions := Seq("2.12.20", "2.13.15"),
scalacOptions ++= Seq("-target:jvm-1.8", "-deprecation", "-feature", "-unchecked"),
scalacOptions ++= (scalaBinaryVersion.value match {
case "2.12" => Seq("-language:higherKinds")
case "2.13" => Nil
}),
javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
Compile / doc / javacOptions := Seq("-source", "1.8"),
// Release settings
publishTo := Some(
if (isSnapshot.value) Opts.resolver.sonatypeOssSnapshots.head else Opts.resolver.sonatypeStaging
),
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
publishMavenStyle := true,
Test / publishArtifact := false,
sonatypeProfileName := "me.lyh",
licenses := Seq("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("https://github.com/nevillelyh/parquet-extra")),
scmInfo := Some(
ScmInfo(
url("https://github.com/nevillelyh/parquet-extra.git"),
"scm:git:[email protected]:nevillelyh/parquet-extra.git"
)
),
developers := List(
Developer(
id = "sinisa_lyh",
name = "Neville Li",
email = "[email protected]",
url = url("https://twitter.com/sinisa_lyh")
)
)
)
val scalatestDependencies = Seq("flatspec", "shouldmatchers")
.map(m => "org.scalatest" %% s"scalatest-$m" % scalatestVersion % Test)
val noPublishSettings = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)
lazy val root: Project = Project(
"parquet-extra",
file(".")
).settings(
commonSettings ++ noPublishSettings,
run := parquetExamples / Compile / run
).aggregate(
parquetAvro,
parquetTensorFlow,
parquetExamples
)
lazy val parquetAvro: Project = Project(
"parquet-avro",
file("parquet-avro")
).settings(
commonSettings,
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value,
libraryDependencies ++= Seq(
"org.apache.avro" % "avro" % avroVersion % Provided,
"org.apache.avro" % "avro-compiler" % avroVersion % Provided,
"org.apache.parquet" % "parquet-column" % parquetVersion % Provided,
"org.apache.parquet" % "parquet-avro" % parquetVersion % Test,
"org.apache.parquet" % "parquet-hadoop" % parquetVersion % Test,
"org.apache.hadoop" % "hadoop-client" % hadoopVersion % Test
),
libraryDependencies ++= scalatestDependencies
).dependsOn(
parquetSchema % Test
)
lazy val parquetTensorFlow: Project = Project(
"parquet-tensorflow",
file("parquet-tensorflow")
).settings(
commonSettings,
crossPaths := false,
autoScalaLibrary := false,
publishArtifact := scalaBinaryVersion.value == "2.12",
libraryDependencies ++= Seq(
"org.apache.parquet" % "parquet-hadoop" % parquetVersion % Provided,
"org.tensorflow" % "tensorflow-core-api" % tensorFlowVersion % Provided,
"org.apache.hadoop" % "hadoop-client" % hadoopVersion % Provided
),
libraryDependencies ++= scalatestDependencies
)
lazy val parquetSchema: Project = Project(
"parquet-schema",
file("parquet-schema")
).settings(
commonSettings ++ noPublishSettings,
libraryDependencies += "org.apache.avro" % "avro" % avroVersion
)
lazy val parquetExamples: Project = Project(
"parquet-examples",
file("parquet-examples")
).settings(
commonSettings ++ noPublishSettings,
libraryDependencies ++= Seq(
"org.apache.avro" % "avro" % avroVersion,
"org.apache.avro" % "avro-compiler" % avroVersion,
"org.apache.parquet" % "parquet-column" % parquetVersion
),
coverageExcludedPackages := Seq(
"me\\.lyh\\.parquet\\.examples\\..*"
).mkString(";")
).dependsOn(
parquetAvro,
parquetTensorFlow,
parquetSchema
)