@@ -35,6 +35,19 @@ object ScalaModulePlugin extends AutoPlugin {
3535 dv.copy(ref = sbtdynver.GitRef (dv.ref.value.split('#' ).head)))),
3636 )
3737
38+ // Settings added to the global scope
39+ override def projectSettings : Seq [Setting [_]] = Seq (
40+ // The staging profile is called `org.scala-lang`, the default is `org.scala-lang.modules`
41+ sonatypeProfileName := " org.scala-lang" ,
42+
43+ // The staging repository name. The default is `[sbt-sonatype] name version`. We cross-build
44+ // using parallel travis jobs, so we include the Scala/Scala.js versions to make them unique.
45+ sonatypeSessionName := {
46+ val sjs = Option (System .getenv(" SCALAJS_VERSION" )).map(v => s " Scala.js $v" ).getOrElse(" " )
47+ s " ${sonatypeSessionName.value} Scala ${scalaVersion.value}$sjs"
48+ },
49+ )
50+
3851 /**
3952 * Enable `-opt:l:inline`, `-opt:l:classpath` or `-optimize`, depending on the scala version.
4053 */
@@ -97,13 +110,6 @@ object ScalaModulePlugin extends AutoPlugin {
97110 |additional information regarding copyright ownership.
98111 | """ .stripMargin)),
99112
100- // The staging profile is called `org.scala-lang`, the default is `org.scala-lang.modules`
101- sonatypeProfileName := " org.scala-lang" ,
102-
103- // The name of the staging repository. The default is `[sbt-sonatype] name version`.Since we
104- // cross-build using parallel travis jobs, we include the Scala version to make them unique.
105- sonatypeSessionName := { s " ${sonatypeSessionName.value} Scala ${scalaVersion.value}" },
106-
107113 scmInfo := Some (ScmInfo (url(s " https://github.com/scala/ ${scalaModuleRepoName.value}" ),s " scm:git:git://github.com/scala/ ${scalaModuleRepoName.value}.git " )),
108114 homepage := Some (url(" http://www.scala-lang.org/" )),
109115 organizationHomepage := Some (url(" http://www.scala-lang.org/" )),
0 commit comments