Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scalafmt-core, scalafmt-dynamic to 3.7.17 #1291

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.7.15"
version = "3.7.17"

align.preset = more
maxColumn = 100
Expand Down
5 changes: 3 additions & 2 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ trait ScalaKernelApi extends Cross.Module[String] with AlmondModule with Depende
def propertyFilePath = "almond/almond.properties"
def propertyExtra = T {
Seq(
"default-scalafmt-version" -> Deps.scalafmtDynamic.dep.version,
"scala-version" -> crossScalaVersion
"default-scalafmt-version" -> Deps.scalafmtDynamic.dep.version,
"default-scalafmt-version-java-8" -> Versions.scalafmtJava8,
"scala-version" -> crossScalaVersion
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ object Properties {
lazy val ammoniteSparkVersion =
Option(props.getProperty("ammonite-spark-version")).getOrElse("[unknown]")
lazy val defaultScalafmtVersionOpt = Option(props.getProperty("default-scalafmt-version"))
lazy val defaultScalafmtVersionJava8Opt =
Option(props.getProperty("default-scalafmt-version-java-8"))

def defaultScalafmtVersion(javaVersion: String): Option[String] =
if (javaVersion.startsWith("1.")) defaultScalafmtVersionJava8Opt
else defaultScalafmtVersionOpt
def defaultScalafmtVersion(): Option[String] =
defaultScalafmtVersion(sys.props("java.version"))

lazy val actualScalaVersion = Option(props.getProperty("scala-version")).getOrElse("[unknown]")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class Scalafmt(
queueEc: ExecutionContext,
logCtx: LoggerContext,
defaultDialect: String,
defaultVersion: String = almond.api.Properties.defaultScalafmtVersionOpt.getOrElse("2.7.5")
defaultVersion: String = almond.api.Properties.defaultScalafmtVersion().getOrElse("3.7.15")
) {

private val log = logCtx(getClass)
Expand Down
3 changes: 2 additions & 1 deletion project/deps.sc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ object Versions {
def caseApp = "2.1.0-M26"
def coursier = "2.1.10"
def jsoniterScala = "2.13.5"
def scalafmt = "3.7.15"
def scalafmt = "3.7.17"
def scalafmtJava8 = "3.7.15"
}

implicit class DepOps(private val dep: Dep) {
Expand Down
Loading