Skip to content

Commit 82fabc5

Browse files
committed
scalafmt-config: move ConfParsed/PlatformConfig
1 parent 0be502b commit 82fabc5

4 files changed

Lines changed: 24 additions & 7 deletions

File tree

build.sbt

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,35 @@ lazy val sysops = crossProject(JVMPlatform)
120120
}
121121
)
122122

123+
lazy val config = crossProject(JVMPlatform)
124+
.withoutSuffixFor(JVMPlatform)
125+
.in(file("scalafmt-config"))
126+
.settings(
127+
moduleName := "scalafmt-config",
128+
description := "Scalafmt config parsing",
129+
scalacOptions ++= scalacJvmOptions.value,
130+
libraryDependencies ++= Seq(
131+
metaconfig.value
132+
)
133+
)
134+
.jvmSettings(
135+
libraryDependencies ++= Seq(
136+
metaconfigTypesafe.value
137+
)
138+
)
139+
// .jsSettings(
140+
// libraryDependencies ++= Seq(
141+
// metaconfigHocon.value,
142+
// )
143+
// )
144+
123145
lazy val core = crossProject(JVMPlatform)
124146
.in(file("scalafmt-core"))
125147
.settings(
126148
moduleName := "scalafmt-core",
127149
buildInfoSettings,
128150
scalacOptions ++= scalacJvmOptions.value,
129151
libraryDependencies ++= Seq(
130-
metaconfig.value,
131152
scalameta.value,
132153
// scala-reflect is an undeclared dependency of fansi, see #1252.
133154
// Scalafmt itself does not require scala-reflect.
@@ -149,17 +170,13 @@ lazy val core = crossProject(JVMPlatform)
149170
)
150171
// .jsSettings(
151172
// libraryDependencies ++= List(
152-
// metaconfigHocon.value,
153173
// scalatest.value % Test // must be here for coreJS/test to run anything
154174
// )
155175
// )
156176
.jvmSettings(
157-
Test / run / fork := true,
158-
libraryDependencies ++= List(
159-
metaconfigTypesafe.value
160-
)
177+
Test / run / fork := true
161178
)
162-
.dependsOn(sysops)
179+
.dependsOn(sysops, config)
163180
.enablePlugins(BuildInfoPlugin)
164181
lazy val coreJVM = core.jvm
165182
// lazy val coreJS = core.js

scalafmt-core/js/src/main/scala/org/scalafmt/config/PlatformConfig.scala renamed to scalafmt-config/js/src/main/scala/org/scalafmt/config/PlatformConfig.scala

File renamed without changes.

scalafmt-core/jvm/src/main/scala/org/scalafmt/config/PlatformConfig.scala renamed to scalafmt-config/jvm/src/main/scala/org/scalafmt/config/PlatformConfig.scala

File renamed without changes.

scalafmt-core/shared/src/main/scala/org/scalafmt/config/ConfParsed.scala renamed to scalafmt-config/shared/src/main/scala/org/scalafmt/config/ConfParsed.scala

File renamed without changes.

0 commit comments

Comments
 (0)