File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed
modules/core/src/main/scala/org/scalasteward/core Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,12 @@ final class MillAlg[F[_]](implicit
7171 private def getMillVersion (buildRootDir : File ): F [Option [Version ]] =
7272 for {
7373 millVersionFileContent <- fileAlg.readFile(buildRootDir / millVersionName)
74- version = millVersionFileContent.flatMap(parser.parseMillVersion)
74+ millVersionFileInConfigContent <- fileAlg.readFile(
75+ buildRootDir / " .config" / millVersionNameInConfig
76+ )
77+ version = millVersionFileContent
78+ .orElse(millVersionFileInConfigContent)
79+ .flatMap(parser.parseMillVersion)
7580 } yield version
7681
7782 private def getMillPluginDeps (
@@ -119,4 +124,5 @@ object MillAlg {
119124 update.artifactIds.exists(_.name === millMainArtifactId.name)
120125
121126 val millVersionName = " .mill-version"
127+ val millVersionNameInConfig = " mill-version"
122128}
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ package org.scalasteward.core.edit.update
1919import cats .Foldable
2020import cats .syntax .all ._
2121import java .util .regex .Pattern
22- import org .scalasteward .core .buildtool .mill .MillAlg .{ isMillMainUpdate , millVersionName }
22+ import org .scalasteward .core .buildtool .mill .MillAlg
2323import org .scalasteward .core .buildtool .sbt .{buildPropertiesName , isSbtUpdate }
2424import org .scalasteward .core .data .{Dependency , Update }
2525import org .scalasteward .core .edit .update .data .VersionPosition ._
@@ -169,8 +169,11 @@ object Selector {
169169 update : Update .Single ,
170170 versionPositions : List [VersionPosition ]
171171 ): List [VersionPosition ] =
172- if (isMillMainUpdate(update))
173- versionPositions.filter(_.version.path.endsWith(millVersionName))
172+ if (MillAlg .isMillMainUpdate(update))
173+ versionPositions.filter(f =>
174+ f.version.path.endsWith(MillAlg .millVersionName) ||
175+ f.version.path.endsWith(MillAlg .millVersionNameInConfig)
176+ )
174177 else List .empty
175178
176179 private def sbtVersionPositions (
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ import io.circe.generic.extras.semiauto._
2424import io .circe .refined ._
2525import io .circe .{Codec , Decoder }
2626import org .scalasteward .core .buildtool .maven .pomXmlName
27- import org .scalasteward .core .buildtool .mill .MillAlg . millVersionName
27+ import org .scalasteward .core .buildtool .mill .MillAlg
2828import org .scalasteward .core .buildtool .sbt .buildPropertiesName
2929import org .scalasteward .core .data .{GroupId , Update }
30- import org .scalasteward .core .scalafmt . scalafmtConfName
30+ import org .scalasteward .core .scalafmt
3131import org .scalasteward .core .update .FilterAlg .{
3232 FilterResult ,
3333 IgnoredByConfig ,
@@ -90,12 +90,13 @@ final case class UpdatesConfig(
9090object UpdatesConfig {
9191 private val defaultFileExtensions : Set [String ] =
9292 Set (
93- millVersionName,
93+ MillAlg .millVersionName,
94+ MillAlg .millVersionNameInConfig,
9495 " .sbt" ,
9596 " .sbt.shared" ,
9697 " .sc" ,
9798 " .scala" ,
98- scalafmtConfName,
99+ scalafmt. scalafmtConfName,
99100 " .yml" ,
100101 buildPropertiesName,
101102 pomXmlName
You can’t perform that action at this time.
0 commit comments