You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
valscalaModuleRepoName= settingKey[String]("The name of the repository under github.com/scala/.")
16
18
valscalaModuleMimaPreviousVersion= settingKey[Option[String]]("The version of this module to compare against when running MiMa.")
17
-
valscalaModuleScalaVersionsByJvm= settingKey[Map[Int, List[(String, Boolean)]]]("For a Java major version (6, 8, 9), a list of a Scala version and a flag indicating whether to use this combination for publishing.")
18
19
valscalaModuleEnableOptimizerInlineFrom= settingKey[String]("The value passed to -opt-inline-from by `enableOptimizer` on 2.13 and higher.")
19
20
}
20
21
importautoImport._
21
22
22
-
//See https://github.com/sbt/sbt/issues/2082
23
-
overridedefrequires=plugins.JvmPlugin
23
+
//depend on DynVerPlugin to allow modifying dynverGitDescribeOutput in buildSettings below
24
+
overridedefrequires=DynVerPlugin
24
25
25
26
overridedeftrigger= allRequirements
26
27
27
28
// Settings in here are implicitly `in ThisBuild`
28
29
overridedefbuildSettings:Seq[Setting[_]] =Seq(
29
-
scalaModuleScalaVersionsByJvm :=Map.empty,
30
-
31
-
crossScalaVersions := {
32
-
valOneDot="""1\.(\d).*""".r // 1.6, 1.8
33
-
valMaj="""(\d+).*""".r // 9
34
-
valjavaVersion=System.getProperty("java.version") match {
35
-
caseOneDot(n) => n.toInt
36
-
caseMaj(n) => n.toInt
37
-
case v =>thrownewRuntimeException(s"Unknown Java version: $v")
38
-
}
39
-
40
-
valisTravis=Option(System.getenv("TRAVIS")).exists(_ =="true") // `contains` doesn't exist in Scala 2.10
case (v, publish) if!isTravisPublishing || publish => v
49
-
}
50
-
if (scalaVersions.isEmpty) {
51
-
if (isTravis) {
52
-
sLog.value.warn(s"No Scala version in `scalaVersionsByJvm` in build.sbt needs to be released on Java major version $javaVersion.")
53
-
// Exit successfully, don't fail the (travis) build. This happens for example if `openjdk7`
54
-
// is part of the travis configuration for testing, but it's not used for releasing against
55
-
// any Scala version.
56
-
System.exit(0)
57
-
} else
58
-
thrownewRuntimeException(s"No Scala version for Java major version $javaVersion. Change your Java version or adjust `scalaVersionsByJvm` in build.sbt.")
0 commit comments