@@ -86,10 +86,7 @@ object DottyJSPlugin extends AutoPlugin {
8686
8787object Build {
8888 import ScaladocConfigs ._
89-
90- val referenceVersion = " 3.4.2-RC1"
91-
92- val baseVersion = " 3.5.0-RC1"
89+ import versionhelpers .DottyVersion ._
9390
9491 // LTS or Next
9592 val versionLine = " Next"
@@ -158,24 +155,6 @@ object Build {
158155 val dottyGithubUrl = " https://github.com/scala/scala3"
159156 val dottyGithubRawUserContentUrl = " https://raw.githubusercontent.com/scala/scala3"
160157
161-
162- val isRelease = sys.env.get(" RELEASEBUILD" ) == Some (" yes" )
163-
164- val dottyVersion = {
165- def isNightly = sys.env.get(" NIGHTLYBUILD" ) == Some (" yes" )
166- if (isRelease)
167- baseVersion
168- else if (isNightly)
169- baseVersion + " -bin-" + VersionUtil .commitDate + " -" + VersionUtil .gitHash + " -NIGHTLY"
170- else
171- baseVersion + " -bin-SNAPSHOT"
172- }
173- val dottyNonBootstrappedVersion = {
174- // Make sure sbt always computes the scalaBinaryVersion correctly
175- val bin = if (! dottyVersion.contains(" -bin" )) " -bin" else " "
176- dottyVersion + bin + " -nonbootstrapped"
177- }
178-
179158 val sbtCommunityBuildVersion = " 0.1.0-SNAPSHOT"
180159
181160 val agentOptions = List (
@@ -625,7 +604,7 @@ object Build {
625604 val contents = // 2.11.11.v20170413-090219-8a413ba7cc
626605 s """ version.number= ${version.value}
627606 |maven.version.number= ${version.value}
628- |git.hash= ${VersionUtil .gitHash}
607+ |git.hash= ${versionhelpers. VersionUtil .gitHash}
629608 |copyright.string=Copyright 2002- $currentYear, LAMP/EPFL
630609 """ .stripMargin
631610
@@ -665,7 +644,7 @@ object Build {
665644 // Spawn new JVM in run and test
666645
667646 // Add git-hash used to package the distribution to the manifest to know it in runtime and report it in REPL
668- packageOptions += ManifestAttributes ((" Git-Hash" , VersionUtil .gitHash)),
647+ packageOptions += ManifestAttributes ((" Git-Hash" , versionhelpers. VersionUtil .gitHash)),
669648
670649 javaOptions ++= {
671650 val log = streams.value.log
@@ -2284,6 +2263,7 @@ object Build {
22842263
22852264object ScaladocConfigs {
22862265 import Build ._
2266+ import versionhelpers .DottyVersion ._
22872267 private lazy val currentYear : String = java.util.Calendar .getInstance().get(java.util.Calendar .YEAR ).toString
22882268
22892269 def dottyExternalMapping = " .*scala/.*::scaladoc3::https://dotty.epfl.ch/api/"
@@ -2363,7 +2343,7 @@ object ScaladocConfigs {
23632343 .add(UseJavacp (true ))
23642344 .add(ProjectName (" scaladoc" ))
23652345 .add(OutputDir (" scaladoc/output/self" ))
2366- .add(Revision (VersionUtil .gitHash))
2346+ .add(Revision (versionhelpers. VersionUtil .gitHash))
23672347 .add(ExternalMappings (List (dottyExternalMapping, javaExternalMapping)))
23682348 .withTargets((Compile / classDirectory).value.getAbsolutePath :: Nil )
23692349 }
0 commit comments