File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
modules/cli/src/main/scala/scala/cli/commands/export0 Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -518,6 +518,8 @@ trait Core extends ScalaCliCrossSbtModule
518518 | def giter8Organization = " ${Deps .giter8.dep.module.organization.value}"
519519 | def giter8Name = " ${Deps .giter8.dep.module.name.value}"
520520 | def giter8Version = " ${Deps .giter8.dep.version}"
521+ |
522+ | def sbtVersion = " ${Deps .Versions .sbtVersion}"
521523 |
522524 | def mavenVersion = " ${Deps .Versions .mavenVersion}"
523525 | def mavenScalaCompilerPluginVersion = " ${Deps .Versions .mavenScalaCompilerPluginVersion}"
Original file line number Diff line number Diff line change @@ -155,11 +155,15 @@ object Export extends ScalaCommand[ExportOptions] {
155155 val shouldExportToSbt = options.sbt.getOrElse(false )
156156 val shouldExportToMaven = options.maven.getOrElse(false )
157157
158- val exportOptions = List (shouldExportToMill, shouldExportToSbt, shouldExportToMaven)
159-
160- if (exportOptions.count(identity) > 1 ) {
158+ val exportOptions =
159+ (if shouldExportToMill then List (" Mill" ) else Nil ) ++
160+ (if shouldExportToSbt then List (" SBT" ) else Nil ) ++
161+ (if shouldExportToMaven then List (" Maven" ) else Nil )
162+ val exportOptionsString = exportOptions.mkString(" , " )
163+ if exportOptions.length > 1 then {
161164 logger.error(
162- s " Error: Cannot export to both mill and sbt. Please pick one build tool to export. "
165+ s """ Error: Cannot export to more than one tool at once (currently chosen: $exportOptionsString).
166+ |Pick one build tool to export to. """ .stripMargin
163167 )
164168 sys.exit(1 )
165169 }
@@ -238,7 +242,7 @@ object Export extends ScalaCommand[ExportOptions] {
238242 project.print(System .out)
239243 }
240244 else {
241- val sbtVersion = options.sbtVersion.getOrElse(" 1.10.2 " )
245+ val sbtVersion = options.sbtVersion.getOrElse(Constants .sbtVersion )
242246 val defaultMavenCompilerVersion = options.mvnVersion.getOrElse(Constants .mavenVersion)
243247 val defaultScalaMavenCompilerVersion =
244248 options.mvnScalaVersion.getOrElse(Constants .mavenScalaCompilerPluginVersion)
Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ object Deps {
124124 def javaSemanticdb = " 0.10.0"
125125 def javaClassName = " 0.1.3"
126126 def bloop = " 2.0.0"
127+ def sbtVersion = " 1.10.2"
127128 def mavenVersion = " 3.8.1"
128129 def mavenScalaCompilerPluginVersion = " 4.9.1"
129130 def mavenExecPluginVersion = " 3.3.0"
You can’t perform that action at this time.
0 commit comments