Skip to content

Commit 5fdcd9b

Browse files
committed
Clean up build; prep for publish to sonatype
1 parent 9b1a6c1 commit 5fdcd9b

File tree

2 files changed

+38
-24
lines changed

2 files changed

+38
-24
lines changed

build.sbt

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
2-
val dottyVersion = "0.17.0"
2+
val dottyVersion = "0.19.0-RC1"
33
val scala211Version = "2.11.12"
44
val scala212Version = "2.12.10"
55
val scala213Version = "2.13.1"
66
val spireVersion = "0.17.0-M1"
7-
val zioVersion = "1.0.0-RC13"
7+
val zioVersion = "1.0.0-RC14"
88
val scalametaVersion = "4.2.3"
99
val onnxJavaCPPPresetVersion = "1.6.0-1.5.2-SNAPSHOT"
1010
scalaVersion := scala212Version
@@ -17,21 +17,25 @@ lazy val commonSettings = Seq(
1717
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
1818
updateOptions := updateOptions.value.withLatestSnapshots(false),
1919
scalacOptions ++= Seq("-feature", "-unchecked", "-deprecation", "-Ywarn-unused", "-Yrangepos"),
20-
autoCompilerPlugins := true
20+
autoCompilerPlugins := true,
21+
organization := "com.github.EmergentOrder",
22+
homepage := Some(url("https://github.com/EmergentOrder/onnx-scala")),
23+
scmInfo := Some(ScmInfo(url("https://github.com/EmergentOrder/onnx-scala"),
24+
"[email protected]:EmergentOrder/onnx-scala.git")),
25+
developers := List(Developer("EmergentOrder",
26+
"Alexander Merritt",
27+
28+
url("https://github.com/EmergentOrder"))),
29+
licenses += ("AGPL-3.0", url("https://www.gnu.org/licenses/agpl-3.0.html")),
30+
publishMavenStyle := true,
31+
publishTo := sonatypePublishToBundle.value
2132
)
2233

23-
lazy val common = (crossProject(JSPlatform, JVMPlatform, NativePlatform)
34+
lazy val common = (crossProject(JSPlatform, JVMPlatform)
2435
.crossType(CrossType.Pure) in file("common"))
2536
.settings(commonSettings, name := "onnx-scala-common",
26-
// excludeFilter in unmanagedSources := (CrossVersion
27-
// .partialVersion(scalaVersion.value) match {
28-
// case Some((0, n)) => "UnionType.scala"
29-
// case _ => ""
30-
// }
31-
// )
3237
)
3338
.jvmSettings(
34-
// scalaVersion := scala213Version,
3539
crossScalaVersions := Seq(
3640
dottyVersion,
3741
scala212Version,
@@ -41,12 +45,11 @@ lazy val common = (crossProject(JSPlatform, JVMPlatform, NativePlatform)
4145
publishArtifact in (Compile, packageDoc) := false
4246
)
4347
.jsSettings(
44-
// scalaVersion := scala213Version,
4548
crossScalaVersions := Seq(scala212Version, scala211Version, scala213Version)
4649
)
47-
.nativeSettings(
48-
scalaVersion := scala211Version
49-
)
50+
// .nativeSettings(
51+
// scalaVersion := scala211Version
52+
// )
5053

5154
lazy val commonJS = common.js
5255
.disablePlugins(dotty.tools.sbtplugin.DottyPlugin)
@@ -58,18 +61,16 @@ lazy val programGenerator = (crossProject(JSPlatform, JVMPlatform)
5861
.settings(
5962
commonSettings,
6063
name := "onnx-scala-program-generator",
61-
// scalaVersion := scala213Version,
6264
mainClass in (Compile, run) := Some(
6365
"org.emergentorder.onnx.ONNXProgramGenerator"
6466
),
6567
libraryDependencies ++= Seq(
66-
("org.scalameta" %% "scalameta" % scalametaVersion).withDottyCompat(dottyVersion)
68+
("org.scalameta" %% "scalameta" % scalametaVersion)
6769
),
6870
publishArtifact in (Compile, packageDoc) := false
6971
)
7072
.jvmSettings(
7173
crossScalaVersions := Seq(
72-
// dottyVersion,
7374
scala212Version,
7475
scala211Version,
7576
scala213Version
@@ -88,7 +89,6 @@ lazy val backends = (crossProject(JVMPlatform, JSPlatform)
8889
.settings(
8990
commonSettings,
9091
name := "onnx-scala-backends",
91-
// scalaVersion := scala213Version,
9292
libraryDependencies ++= Seq(
9393
"org.bytedeco" % "ngraph-platform" % "0.25.0-1.5.2-SNAPSHOT"
9494
),
@@ -128,19 +128,17 @@ lazy val core = (crossProject(JSPlatform, JVMPlatform)
128128
publishArtifact in (Compile, packageDoc) := false,
129129
libraryDependencies ++= (CrossVersion
130130
.partialVersion(scalaVersion.value) match {
131-
case Some((2, n)) if (n == 13 || n == 11) =>
131+
case Some((2, n)) =>
132132
Seq(
133133
"org.typelevel" %% "spire" % spireVersion
134134
)
135135
case _ =>
136136
Seq(
137-
("org.typelevel" %% "spire" % spireVersion)
138-
.withDottyCompat(dottyVersion)
137+
("org.typelevel" %% "spire" % spireVersion).withDottyCompat(dottyVersion)
139138
)
140139
}),
141140
libraryDependencies ++= Seq(
142-
("org.bytedeco" % "onnx-platform" % onnxJavaCPPPresetVersion)
143-
.withDottyCompat(dottyVersion)
141+
"org.bytedeco" % "onnx-platform" % onnxJavaCPPPresetVersion
144142
)
145143
)
146144
.jsSettings(
@@ -202,3 +200,17 @@ lazy val zio = (crossProject(JVMPlatform, JSPlatform)
202200
.jsSettings(
203201
crossScalaVersions := Seq(scala212Version, scala211Version, scala213Version)
204202
)
203+
204+
lazy val sonatypeSettings = Seq(
205+
organization := "com.github.EmergentOrder",
206+
homepage := Some(url("https://github.com/EmergentOrder/onnx-scala")),
207+
scmInfo := Some(ScmInfo(url("https://github.com/EmergentOrder/onnx-scala"),
208+
"[email protected]:EmergentOrder/onnx-scala.git")),
209+
developers := List(Developer("EmergentOrder",
210+
"Alexander Merritt",
211+
212+
url("https://github.com/EmergentOrder"))),
213+
licenses += ("AGPL-3.0", url("https://www.gnu.org/licenses/agpl-3.0.html")),
214+
publishMavenStyle := true,
215+
publishTo := sonatypePublishToBundle.value
216+
)

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.3.9")
55
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.3.4")
66
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.7")
77
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.0.6")
8+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8")
9+
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0")

0 commit comments

Comments
 (0)