@@ -27,9 +27,9 @@ lazy val commonSettings = Seq(
27
27
" -unchecked" ,
28
28
" -Xmacro-settings:" + sys.props.getOrElse(" macro.settings" , " none" )
29
29
) ++ (CrossVersion .partialVersion(scalaVersion.value) match {
30
- case Some ((2 , 12 )) => Seq (" -language:higherKinds" )
31
- case Some ((3 , _ )) => Seq (" -Xcheck-macros " , " -explain " )
32
- case _ => Seq ()
30
+ case Some ((2 , 12 )) => Seq (" -language:higherKinds" , " -opt:l:method " )
31
+ case Some ((2 , 13 )) => Seq (" -opt:l:method " )
32
+ case _ => Seq (" -Xcheck-macros " , " -explain " )
33
33
}),
34
34
compileOrder := CompileOrder .JavaThenScala ,
35
35
Test / testOptions += Tests .Argument (" -oDF" ),
@@ -51,14 +51,19 @@ lazy val commonSettings = Seq(
51
51
)
52
52
53
53
lazy val jsSettings = Seq (
54
- scalacOptions += {
54
+ scalacOptions ++ = {
55
55
val localSourcesPath = (LocalRootProject / baseDirectory).value.toURI
56
56
val remoteSourcesPath = s " https://raw.githubusercontent.com/plokhotnyuk/jsoniter-scala/ ${git.gitHeadCommit.value.get}/ "
57
- val sourcesOptionName = CrossVersion .partialVersion(scalaVersion.value) match {
58
- case Some ((2 , _)) => " -P:scalajs:mapSourceURI"
59
- case _ => " -scalajs-mapSourceURI"
57
+ CrossVersion .partialVersion(scalaVersion.value) match {
58
+ case Some ((2 , _)) => Seq (
59
+ s " -P:scalajs:mapSourceURI: $localSourcesPath-> $remoteSourcesPath" ,
60
+ " -P:scalajs:genStaticForwardersForNonTopLevelObjects"
61
+ )
62
+ case _ => Seq (
63
+ s " -scalajs-mapSourceURI: $localSourcesPath-> $remoteSourcesPath" ,
64
+ " -scalajs-genStaticForwardersForNonTopLevelObjects"
65
+ )
60
66
}
61
- s " $sourcesOptionName: $localSourcesPath-> $remoteSourcesPath"
62
67
},
63
68
libraryDependencies ++= Seq (
64
69
" io.github.cquiroz" %%% " scala-java-time-tzdb" % " 2.5.0" % Test
@@ -81,6 +86,10 @@ lazy val jsSettings = Seq(
81
86
)
82
87
83
88
lazy val nativeSettings = Seq (
89
+ scalacOptions ++= (CrossVersion .partialVersion(scalaVersion.value) match {
90
+ case Some ((2 , _)) => Seq (" -P:scalanative:genStaticForwardersForNonTopLevelObjects" )
91
+ case _ => Seq (" -scalanative-genStaticForwardersForNonTopLevelObjects" )
92
+ }),
84
93
libraryDependencies ++= Seq (
85
94
" io.github.cquiroz" %%% " scala-java-time-tzdb" % " 2.5.0" % Test
86
95
),
0 commit comments