1
1
import sbtcrossproject .CrossPlugin .autoImport .{crossProject , CrossType }
2
2
3
3
// val dottyVersion = dottyLatestNightlyBuild.get
4
- val dottyVersion = " 3.1.0-RC3 "
5
- val spireVersion = " 0.17.0 "
4
+ val dottyVersion = " 3.1.0"
5
+ val spireVersion = " 0.18.0-M1 "
6
6
val scalaTestVersion = " 3.2.10"
7
7
8
8
scalaVersion := dottyVersion
9
9
10
10
lazy val commonSettings = Seq (
11
- // scalaJSUseMainModuleInitializer := true, //Test only
12
11
organization := " org.emergentorder.onnx" ,
13
12
version := " 0.15.0" ,
14
13
scalaVersion := dottyVersion,
@@ -17,7 +16,6 @@ lazy val commonSettings = Seq(
17
16
updateOptions := updateOptions.value.withLatestSnapshots(false ),
18
17
scalacOptions ++= Seq (" -feature" , " -unchecked" , " -deprecation" ),
19
18
autoCompilerPlugins := true
20
- // sources in (Compile, doc) := Seq(), //Bug w/ Dotty & JS on doc
21
19
) ++ sonatypeSettings
22
20
23
21
lazy val common = (crossProject(JSPlatform , JVMPlatform )
@@ -51,16 +49,9 @@ lazy val proto = (crossProject(JSPlatform, JVMPlatform)
51
49
lazy val backends = (crossProject(JVMPlatform , JSPlatform )
52
50
.crossType(CrossType .Pure ) in file(" backends" ))
53
51
.dependsOn(core)
54
- // conditionally enabling/disable based on version, still not working
55
- // .enablePlugins(ScalablyTypedConverterPlugin)
56
52
.settings(
57
53
commonSettings,
58
54
name := " onnx-scala-backends" ,
59
- // excludeFilter in unmanagedSources := (CrossVersion
60
- // .partialVersion(scalaVersion.value) match {
61
- // case _ => "Main.scala" | "ONNXJSOperatorBackend.scala"
62
- // }),
63
- // scalacOptions ++= { if (isDotty.value) Seq("-source:3.0-migration") else Nil },
64
55
libraryDependencies ++= Seq (
65
56
" com.microsoft.onnxruntime" % " onnxruntime" % " 1.9.0"
66
57
),
@@ -72,11 +63,8 @@ lazy val backends = (crossProject(JVMPlatform, JSPlatform)
72
63
)
73
64
.jsSettings(scalaJSUseMainModuleInitializer := true , // , //Testing
74
65
npmDependencies in Compile += " onnxruntime-web" -> " 1.9.0" )
75
- // Seems to be a bundling issue, copying things manually seems to work
76
- // TODO NEW: try JS, bundler and converter beta/RC are out
77
- // npmDependencies in Compile += "onnxjs" -> "0.1.8")
78
66
.jsConfigure { project => project.enablePlugins(ScalablyTypedConverterPlugin )}
79
- // ScalaJSBundlerPlugin)} //,ScalablyTypedConverterPlugin) }
67
+
80
68
81
69
lazy val core = (crossProject(JSPlatform , JVMPlatform )
82
70
.crossType(CrossType .Pure ) in file(" core" ))
@@ -85,15 +73,14 @@ lazy val core = (crossProject(JSPlatform, JVMPlatform)
85
73
.settings(
86
74
commonSettings,
87
75
name := " onnx-scala" ,
88
- // scalacOptions ++= { if (isDotty.value) Seq("-source:3.0-migration") else Nil },
89
76
crossScalaVersions := Seq (
90
77
dottyVersion
91
78
),
92
79
libraryDependencies ++= (CrossVersion
93
80
.partialVersion(scalaVersion.value) match {
94
81
case _ =>
95
82
Seq (
96
- (" org.typelevel" %%% " spire" % spireVersion).cross( CrossVersion .for3Use2_13)
83
+ (" org.typelevel" %%% " spire" % spireVersion)
97
84
)
98
85
})
99
86
)
0 commit comments