@@ -36,6 +36,12 @@ addCommandAlias(
36
36
.mkString(" ; " , " /test ; " , " /test" )
37
37
)
38
38
39
+ addCommandAlias(
40
+ " testNative" ,
41
+ Seq (" coreNative" , " derivationNative" , " compat-catsNative" , " compat-circeNative" , " compat-scodecNative" )
42
+ .mkString(" ; " , " /test ; " , " /test" )
43
+ )
44
+
39
45
lazy val commonSettings = Seq (
40
46
scalaVersion := scala3,
41
47
scalacOptions ++= Seq (
@@ -126,13 +132,13 @@ val macrolizer = Def.setting("io.bullet" %%% "macrolizer" %
126
132
// ///////////////////// PROJECTS /////////////////////////
127
133
128
134
lazy val borer = (project in file(" ." ))
129
- .aggregate(`core-jvm`, `core-js`)
135
+ .aggregate(`core-jvm`, `core-js`, `core-native` )
130
136
.aggregate(`compat-akka`)
131
137
.aggregate(`compat-pekko`)
132
- .aggregate(`compat-cats-jvm`, `compat-cats-js`)
133
- .aggregate(`compat-circe-jvm`, `compat-circe-js`)
134
- .aggregate(`compat-scodec-jvm`, `compat-scodec-js`)
135
- .aggregate(`derivation-jvm`, `derivation-js`)
138
+ .aggregate(`compat-cats-jvm`, `compat-cats-js`, `compat-cats-native` )
139
+ .aggregate(`compat-circe-jvm`, `compat-circe-js`, `compat-circe-native` )
140
+ .aggregate(`compat-scodec-jvm`, `compat-scodec-js`, `compat-scodec-native` )
141
+ .aggregate(`derivation-jvm`, `derivation-js`, `derivation-native` )
136
142
// .aggregate(benchmarks)
137
143
.aggregate(site)
138
144
.settings(commonSettings)
@@ -142,9 +148,10 @@ lazy val borer = (project in file("."))
142
148
onLoadMessage := welcomeMessage.value
143
149
)
144
150
145
- lazy val `core-jvm` = core.jvm.enablePlugins(SpecializeJsonParserPlugin )
146
- lazy val `core-js` = core.js
147
- lazy val core = crossProject(JSPlatform , JVMPlatform )
151
+ lazy val `core-jvm` = core.jvm.enablePlugins(SpecializeJsonParserPlugin )
152
+ lazy val `core-js` = core.js
153
+ lazy val `core-native` = core.native.enablePlugins(SpecializeJsonParserPlugin )
154
+ lazy val core = crossProject(JSPlatform , NativePlatform , JVMPlatform )
148
155
.withoutSuffixFor(JVMPlatform )
149
156
.crossType(CrossType .Pure )
150
157
.enablePlugins(AutomateHeaderPlugin )
@@ -159,6 +166,11 @@ lazy val core = crossProject(JSPlatform, JVMPlatform)
159
166
Compile / specializeJsonParser / sourceManaged := baseDirectory.value / " target" / " scala" / " src_managed" / " main" ,
160
167
Compile / managedSourceDirectories += (Compile / specializeJsonParser / sourceManaged).value
161
168
)
169
+ .nativeSettings(
170
+ Compile / specializeJsonParser / sourceDirectory := baseDirectory.value.getParentFile / " src" / " main" ,
171
+ Compile / specializeJsonParser / sourceManaged := baseDirectory.value / " target" / " scala" / " src_managed" / " main" ,
172
+ Compile / managedSourceDirectories += (Compile / specializeJsonParser / sourceManaged).value
173
+ )
162
174
.jsSettings(scalajsSettings : _* )
163
175
164
176
lazy val `compat-akka` = project
@@ -197,7 +209,10 @@ lazy val `compat-cats-jvm` = `compat-cats`.jvm
197
209
lazy val `compat-cats-js` = `compat-cats`.js
198
210
.dependsOn(`core-js` % " compile->compile;test->test" )
199
211
.dependsOn(`derivation-js` % " test->compile" )
200
- lazy val `compat-cats` = crossProject(JSPlatform , JVMPlatform )
212
+ lazy val `compat-cats-native` = `compat-cats`.native
213
+ .dependsOn(`core-native` % " compile->compile;test->test" )
214
+ .dependsOn(`derivation-native` % " test->compile" )
215
+ lazy val `compat-cats` = crossProject(JSPlatform , NativePlatform , JVMPlatform )
201
216
.withoutSuffixFor(JVMPlatform )
202
217
.crossType(CrossType .Pure )
203
218
.enablePlugins(AutomateHeaderPlugin )
@@ -215,7 +230,10 @@ lazy val `compat-circe-jvm` = `compat-circe`.jvm
215
230
lazy val `compat-circe-js` = `compat-circe`.js
216
231
.dependsOn(`core-js` % " compile->compile;test->test" )
217
232
.dependsOn(`derivation-js` % " test->compile" )
218
- lazy val `compat-circe` = crossProject(JSPlatform , JVMPlatform )
233
+ lazy val `compat-circe-native` = `compat-circe`.native
234
+ .dependsOn(`core-native` % " compile->compile;test->test" )
235
+ .dependsOn(`derivation-native` % " test->compile" )
236
+ lazy val `compat-circe` = crossProject(JSPlatform , NativePlatform , JVMPlatform )
219
237
.withoutSuffixFor(JVMPlatform )
220
238
.crossType(CrossType .Pure )
221
239
.enablePlugins(AutomateHeaderPlugin )
@@ -238,7 +256,10 @@ lazy val `compat-scodec-jvm` = `compat-scodec`.jvm
238
256
lazy val `compat-scodec-js` = `compat-scodec`.js
239
257
.dependsOn(`core-js` % " compile->compile;test->test" )
240
258
.dependsOn(`derivation-js` % " test->compile" )
241
- lazy val `compat-scodec` = crossProject(JSPlatform , JVMPlatform )
259
+ lazy val `compat-scodec-native` = `compat-scodec`.native
260
+ .dependsOn(`core-native` % " compile->compile;test->test" )
261
+ .dependsOn(`derivation-native` % " test->compile" )
262
+ lazy val `compat-scodec` = crossProject(JSPlatform , NativePlatform , JVMPlatform )
242
263
.withoutSuffixFor(JVMPlatform )
243
264
.crossType(CrossType .Pure )
244
265
.enablePlugins(AutomateHeaderPlugin )
@@ -257,15 +278,17 @@ lazy val `derivation-jvm` = derivation.jvm
257
278
.dependsOn(`core-jvm` % " compile->compile;test->test" )
258
279
lazy val `derivation-js` = derivation.js
259
280
.dependsOn(`core-js` % " compile->compile;test->test" )
260
- lazy val derivation = crossProject(JSPlatform , JVMPlatform )
281
+ lazy val `derivation-native` = derivation.native
282
+ .dependsOn(`core-native` % " compile->compile;test->test" )
283
+ lazy val derivation = crossProject(JSPlatform , NativePlatform , JVMPlatform )
261
284
.withoutSuffixFor(JVMPlatform )
262
285
.crossType(CrossType .Pure )
263
286
.enablePlugins(AutomateHeaderPlugin )
264
287
.settings(commonSettings)
265
288
.settings(releaseSettings)
266
289
.settings(
267
290
moduleName := " borer-derivation" ,
268
- libraryDependencies ++= Seq (macrolizer.value, munit.value),
291
+ libraryDependencies ++= Seq (/* macrolizer.value, */ munit.value), // TODO port macrolizer to scala native
269
292
)
270
293
.jsSettings(scalajsSettings : _* )
271
294
0 commit comments