File tree 2 files changed +19
-5
lines changed
modules/tasty-lib/src/main/scala/scala/build/tastylib
2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -1034,7 +1034,23 @@ class TastyLib(val crossScalaVersion: String) extends ScalaCliCrossSbtModule
1034
1034
else Nil
1035
1035
}
1036
1036
)
1037
+ def constantsFile = T .persistent {
1038
+ val dir = T .dest / " constants"
1039
+ val dest = dir / " Constants.scala"
1040
+ val code =
1041
+ s """ package scala.build.tastylib.internal
1042
+ |
1043
+ |/** Build-time constants. Generated by mill. */
1044
+ |object Constants {
1045
+ | def latestSupportedScala = " ${Scala .defaultInternal}"
1046
+ |}
1047
+ | """ .stripMargin
1048
+ if (! os.isFile(dest) || os.read(dest) != code)
1049
+ os.write.over(dest, code, createFolders = true )
1050
+ PathRef (dir)
1051
+ }
1037
1052
1053
+ def generatedSources = super .generatedSources() ++ Seq (constantsFile())
1038
1054
}
1039
1055
1040
1056
object `local-repo` extends LocalRepo {
Original file line number Diff line number Diff line change 1
1
package scala .build .tastylib
2
2
3
+ import scala .build .tastylib .internal .Constants
4
+
3
5
object TastyVersions {
4
6
5
7
// Every time tasty version is updated, please update LatestSupportedScala as well!
6
- final val MajorVersion : Int = 28
7
- final val MinorVersion : Int = 1
8
- final val ExperimentalVersion : Int = 0
9
-
10
8
object LatestSupportedScala {
11
9
final val MajorVersion : Int = 3
12
- final val MinorVersion : Int = 1
10
+ final val MinorVersion : Int = Constants .latestSupportedScala.split( '.' )( 1 ).toInt
13
11
}
14
12
15
13
def shouldRunPreprocessor (
You can’t perform that action at this time.
0 commit comments