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
71
71
private def getMillVersion (buildRootDir : File ): F [Option [Version ]] =
72
72
for {
73
73
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)
75
80
} yield version
76
81
77
82
private def getMillPluginDeps (
@@ -119,4 +124,5 @@ object MillAlg {
119
124
update.artifactIds.exists(_.name === millMainArtifactId.name)
120
125
121
126
val millVersionName = " .mill-version"
127
+ val millVersionNameInConfig = " mill-version"
122
128
}
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ package org.scalasteward.core.edit.update
19
19
import cats .Foldable
20
20
import cats .syntax .all ._
21
21
import java .util .regex .Pattern
22
- import org .scalasteward .core .buildtool .mill .MillAlg .{ isMillMainUpdate , millVersionName }
22
+ import org .scalasteward .core .buildtool .mill .MillAlg
23
23
import org .scalasteward .core .buildtool .sbt .{buildPropertiesName , isSbtUpdate }
24
24
import org .scalasteward .core .data .{Dependency , Update }
25
25
import org .scalasteward .core .edit .update .data .VersionPosition ._
@@ -169,8 +169,11 @@ object Selector {
169
169
update : Update .Single ,
170
170
versionPositions : List [VersionPosition ]
171
171
): 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
+ )
174
177
else List .empty
175
178
176
179
private def sbtVersionPositions (
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ import io.circe.generic.extras.semiauto._
24
24
import io .circe .refined ._
25
25
import io .circe .{Codec , Decoder }
26
26
import org .scalasteward .core .buildtool .maven .pomXmlName
27
- import org .scalasteward .core .buildtool .mill .MillAlg . millVersionName
27
+ import org .scalasteward .core .buildtool .mill .MillAlg
28
28
import org .scalasteward .core .buildtool .sbt .buildPropertiesName
29
29
import org .scalasteward .core .data .{GroupId , Update }
30
- import org .scalasteward .core .scalafmt . scalafmtConfName
30
+ import org .scalasteward .core .scalafmt
31
31
import org .scalasteward .core .update .FilterAlg .{
32
32
FilterResult ,
33
33
IgnoredByConfig ,
@@ -90,12 +90,13 @@ final case class UpdatesConfig(
90
90
object UpdatesConfig {
91
91
private val defaultFileExtensions : Set [String ] =
92
92
Set (
93
- millVersionName,
93
+ MillAlg .millVersionName,
94
+ MillAlg .millVersionNameInConfig,
94
95
" .sbt" ,
95
96
" .sbt.shared" ,
96
97
" .sc" ,
97
98
" .scala" ,
98
- scalafmtConfName,
99
+ scalafmt. scalafmtConfName,
99
100
" .yml" ,
100
101
buildPropertiesName,
101
102
pomXmlName
You can’t perform that action at this time.
0 commit comments