@@ -1471,6 +1471,7 @@ object Build {
1471
1471
/* Configuration of the org.scala-lang:scala3-sbt-bridge:*.**.**-bootstrapped project */
1472
1472
lazy val `scala3-sbt-bridge-bootstrapped` = project.in(file(" sbt-bridge" ))
1473
1473
.dependsOn(`scala3-compiler-bootstrapped-new`) // TODO: Would this actually evict the reference compiler in scala-tool?
1474
+ .settings(publishSettings)
1474
1475
.settings(
1475
1476
name := " scala3-sbt-bridge-bootstrapped" ,
1476
1477
moduleName := " scala3-sbt-bridge" ,
@@ -1542,6 +1543,7 @@ object Build {
1542
1543
// when compiling a project that depends on scala3-staging (see sbt-test/sbt-dotty/quoted-example-project),
1543
1544
// but we always need it to be present on the JVM classpath at runtime.
1544
1545
.dependsOn(`scala3-compiler-bootstrapped-new` % " provided; compile->runtime; test->test" )
1546
+ .settings(publishSettings)
1545
1547
.settings(
1546
1548
name := " scala3-staging" ,
1547
1549
moduleName := " scala3-staging" ,
@@ -1599,6 +1601,7 @@ object Build {
1599
1601
// when compiling a project that depends on scala3-tasty-inspector (see sbt-test/sbt-dotty/tasty-inspector-example-project),
1600
1602
// but we always need it to be present on the JVM classpath at runtime.
1601
1603
.dependsOn(`scala3-compiler-bootstrapped-new` % " provided; compile->runtime; test->test" )
1604
+ .settings(publishSettings)
1602
1605
.settings(
1603
1606
name := " scala3-tasty-inspector" ,
1604
1607
moduleName := " scala3-tasty-inspector" ,
@@ -1737,6 +1740,7 @@ object Build {
1737
1740
/* Configuration of the org.scala-lang:scala-library:*.**.**-bootstrapped project */
1738
1741
lazy val `scala-library-bootstrapped` = project.in(file(" library" ))
1739
1742
.enablePlugins(ScalaLibraryPlugin )
1743
+ .settings(publishSettings)
1740
1744
.settings(
1741
1745
name := " scala-library-bootstrapped" ,
1742
1746
moduleName := " scala-library" ,
@@ -1809,6 +1813,7 @@ object Build {
1809
1813
/* Configuration of the org.scala-lang:scala3-library_3:*.**.**-bootstrapped project */
1810
1814
lazy val `scala3-library-bootstrapped-new` = project.in(file(" library" ))
1811
1815
.dependsOn(`scala-library-bootstrapped`)
1816
+ .settings(publishSettings)
1812
1817
.settings(
1813
1818
name := " scala3-library-bootstrapped" ,
1814
1819
moduleName := " scala3-library" ,
@@ -1851,6 +1856,7 @@ object Build {
1851
1856
// We add a dependency to the JVM library to have the classfile available
1852
1857
// (as they are not part of this artifact)
1853
1858
.dependsOn(`scala3-library-bootstrapped-new`)
1859
+ .settings(publishSettings)
1854
1860
.settings(
1855
1861
name := " scala-library-sjs" ,
1856
1862
organization := " org.scala-js" ,
@@ -1961,6 +1967,7 @@ object Build {
1961
1967
/* Configuration of the org.scala-lang:scala3-library_sjs1_3:*.**.**-bootstrapped project */
1962
1968
lazy val `scala3-library-sjs` = project.in(file(" library-js" ))
1963
1969
.dependsOn(`scala-library-sjs`)
1970
+ .settings(publishSettings)
1964
1971
.settings(
1965
1972
name := " scala3-library-sjs" ,
1966
1973
moduleName := " scala3-library_sjs1" ,
@@ -2064,6 +2071,7 @@ object Build {
2064
2071
/* Configuration of the org.scala-lang:tasty-core_3:*.**.**-bootstrapped project */
2065
2072
lazy val `tasty-core-bootstrapped-new` = project.in(file(" tasty" ))
2066
2073
.dependsOn(`scala3-library-bootstrapped-new`)
2074
+ .settings(publishSettings)
2067
2075
.settings(
2068
2076
name := " tasty-core-bootstrapped" ,
2069
2077
moduleName := " tasty-core" ,
@@ -2256,6 +2264,7 @@ object Build {
2256
2264
/* Configuration of the org.scala-lang:scala3-compiler_3:*.**.**-bootstrapped project */
2257
2265
lazy val `scala3-compiler-bootstrapped-new` = project.in(file(" compiler" ))
2258
2266
.dependsOn(`scala3-interfaces`, `tasty-core-bootstrapped-new`, `scala3-library-bootstrapped-new`)
2267
+ .settings(publishSettings)
2259
2268
.settings(
2260
2269
name := " scala3-compiler-bootstrapped" ,
2261
2270
moduleName := " scala3-compiler" ,
@@ -2390,6 +2399,7 @@ object Build {
2390
2399
/* Configuration of the org.scala-lang:scaladoc_3:*.**.**-bootstrapped project */
2391
2400
lazy val `scaladoc-new` = project.in(file(" scaladoc" ))
2392
2401
.dependsOn(`scala3-compiler-bootstrapped-new`, `scala3-tasty-inspector-new`)
2402
+ .settings(publishSettings)
2393
2403
.settings(
2394
2404
name := " scaladoc" ,
2395
2405
moduleName := " scaladoc" ,
@@ -3527,10 +3537,24 @@ object Build {
3527
3537
publishMavenStyle := true ,
3528
3538
isSnapshot := version.value.contains(" SNAPSHOT" ),
3529
3539
publishTo := {
3530
- val centralSnapshots = " https://central.sonatype.com/repository/maven-snapshots/"
3531
- if (isSnapshot.value) Some (" central-snapshots" at centralSnapshots)
3532
- else localStaging.value
3540
+ if (sys.env.get(" NEWNIGHTLY" ).contains(" yes" )) {
3541
+ Some (sys.env(" MAVEN_REPOSITORY_REALM" ) at sys.env(" MAVEN_REPOSITORY_URL" ))
3542
+ } else if (isSnapshot.value) {
3543
+ Some (" central-snapshots" at " https://central.sonatype.com/repository/maven-snapshots/" )
3544
+ } else
3545
+ localStaging.value
3533
3546
},
3547
+ credentials ++= (
3548
+ if (sys.env.get(" NEWNIGHTLY" ).contains(" yes" )) {
3549
+ for {
3550
+ username <- sys.env.get(" MAVEN_REPOSITORY_USER" )
3551
+ token <- sys.env.get(" MAVEN_REPOSITORY_TOKEN" )
3552
+ } yield Credentials (sys.env(" MAVEN_REPOSITORY_REALM" ), sys.env(" MAVEN_REPOSITORY_HOST" ), username, token)
3553
+ }
3554
+ else
3555
+ // The old build credentials are configured differently
3556
+ None
3557
+ ).toList,
3534
3558
publishConfiguration ~= (_.withOverwrite(true )),
3535
3559
publishLocalConfiguration ~= (_.withOverwrite(true )),
3536
3560
projectID ~= {id =>
@@ -3539,76 +3563,8 @@ object Build {
3539
3563
},
3540
3564
Test / publishArtifact := false ,
3541
3565
homepage := Some (url(dottyGithubUrl)),
3542
- licenses += ((" Apache-2.0" ,
3543
- url(" https://www.apache.org/licenses/LICENSE-2.0" ))),
3544
- scmInfo := Some (
3545
- ScmInfo (
3546
- url(dottyGithubUrl),
3547
- " scm:git:[email protected] :scala/scala3.git"
3548
- )
3549
- ),
3550
- developers := List (
3551
- Developer (
3552
- id = " odersky" ,
3553
- name = " Martin Odersky" ,
3554
-
3555
- url = url(" https://github.com/odersky" )
3556
- ),
3557
- Developer (
3558
- id = " DarkDimius" ,
3559
- name = " Dmitry Petrashko" ,
3560
-
3561
- url = url(" https://d-d.me" )
3562
- ),
3563
- Developer (
3564
- id = " smarter" ,
3565
- name = " Guillaume Martres" ,
3566
-
3567
- url = url(" http://guillaume.martres.me" )
3568
- ),
3569
- Developer (
3570
- id = " felixmulder" ,
3571
- name = " Felix Mulder" ,
3572
-
3573
- url = url(" http://felixmulder.com" )
3574
- ),
3575
- Developer (
3576
- id = " liufengyun" ,
3577
- name = " Liu Fengyun" ,
3578
-
3579
- url = url(" https://fengy.me" )
3580
- ),
3581
- Developer (
3582
- id = " nicolasstucki" ,
3583
- name = " Nicolas Stucki" ,
3584
-
3585
- url = url(" https://github.com/nicolasstucki" )
3586
- ),
3587
- Developer (
3588
- id = " OlivierBlanvillain" ,
3589
- name = " Olivier Blanvillain" ,
3590
-
3591
- url = url(" https://github.com/OlivierBlanvillain" )
3592
- ),
3593
- Developer (
3594
- id = " biboudis" ,
3595
- name = " Aggelos Biboudis" ,
3596
-
3597
- url = url(" http://biboudis.github.io" )
3598
- ),
3599
- Developer (
3600
- id = " allanrenucci" ,
3601
- name = " Allan Renucci" ,
3602
-
3603
- url = url(" https://github.com/allanrenucci" )
3604
- ),
3605
- Developer (
3606
- id = " Duhemm" ,
3607
- name = " Martin Duhem" ,
3608
-
3609
- url = url(" https://github.com/Duhemm" )
3610
- )
3611
- )
3566
+ licenses += ((" Apache-2.0" , url(" https://www.apache.org/licenses/LICENSE-2.0" ))),
3567
+ scmInfo
:= Some (
ScmInfo (url(dottyGithubUrl),
" scm:git:[email protected] :scala/scala3.git" )),
3612
3568
)
3613
3569
3614
3570
lazy val commonDistSettings = Seq (
0 commit comments