Skip to content

Commit 88f53a1

Browse files
committed
Fix usages of central sonatype
1 parent 35cf648 commit 88f53a1

File tree

4 files changed

+12
-25
lines changed

4 files changed

+12
-25
lines changed

build.sbt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
val ScalaNativeVersion = "0.5.8-SNAPSHOT"
2-
// Update during release procedure to provide access to staged, but not published artifacts
3-
val StagingRepoIds = Nil
4-
val StagingRepoNames = StagingRepoIds.map(id => s"orgscala-native-$id").toSeq
52

63
val crossScalaVersions212 = (14 to 20).map("2.12." + _)
74
val crossScalaVersions213 = (8 to 16).map("2.13." + _)
85
val crossScalaVersions3 =
96
(2 to 3).map("3.1." + _) ++
107
(0 to 2).map("3.2." + _) ++
11-
(0 to 4).map("3.3." + _) ++
8+
(0 to 6).map("3.3." + _) ++
129
(0 to 3).map("3.4." + _) ++
1310
(0 to 2).map("3.5." + _) ++
14-
(2 to 3).map("3.6." + _)
11+
(2 to 4).map("3.6." + _) ++
12+
(0 to 1).map("3.7." + _) ++
13+
Nil
1514

1615
val scala2_12 = crossScalaVersions212.last
1716
val scala2_13 = crossScalaVersions213.last
1817
val scala3 = crossScalaVersions3.last
1918
val scala3PublishVersion = "3.1.3"
2019

20+
sonatypePublishSettings
21+
2122
val publishScalaVersions = Seq(scala2_12, scala2_13, scala3PublishVersion)
2223

2324
def scalaReleasesForBinaryVersion(v: String): Seq[String] = v match {
@@ -100,7 +101,7 @@ inThisBuild(
100101
)
101102
),
102103
// Used during the releases
103-
resolvers ++= StagingRepoNames.flatMap(Resolver.sonatypeOssRepos(_)),
104+
resolvers += "Sonatype Central Deployments" at "https://central.sonatype.com/api/v1/publisher/deployments/download/",
104105
resolvers ++= Resolver.sonatypeOssRepos("snapshots"),
105106
resolvers += Resolver.mavenCentral,
106107
resolvers += Resolver.defaultLocal
@@ -154,9 +155,7 @@ lazy val cliScriptedTests = project
154155
"-Dplugin.version=" + (cli / scalaNativeVersion).value,
155156
"-Dscala.version=" + (cli / scalaVersion).value,
156157
"-Dscala-native-cli=" + cliPath,
157-
"-Dscala-native-cli-pack=" + packDir,
158-
"-Dscalanative.build.staging.resolvers=" + StagingRepoNames
159-
.mkString(",")
158+
"-Dscala-native-cli-pack=" + packDir
160159
)
161160
},
162161
scriptedBufferLog := false,
@@ -306,6 +305,9 @@ lazy val cliPackSettings = Def.settings(
306305
lazy val publishSettings = Def.settings(
307306
Compile / publishArtifact := true,
308307
Test / publishArtifact := false,
308+
sonatypePublishSettings
309+
)
310+
lazy val sonatypePublishSettings = Def.settings(
309311
publishMavenStyle := true,
310312
pomIncludeRepository := (_ => false),
311313
publishTo := {
@@ -319,7 +321,7 @@ lazy val publishSettings = Def.settings(
319321
user <- sys.env.get("SONATYPE_USER")
320322
password <- sys.env.get("SONATYPE_PASSWORD")
321323
} yield Credentials(
322-
realm = "Sonatype Nexus Repository Manager",
324+
realm = "",
323325
host = "central.sonatype.com",
324326
userName = user,
325327
passwd = password

cli/src/sbt-test/integration/cli/build.sbt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
resolvers ++= Resolver.sonatypeOssRepos("snapshots")
2-
resolvers ++= sys.props
3-
.get("scalanative.build.staging.resolvers")
4-
.toList
5-
.flatMap(_.split(","))
6-
.flatMap(Resolver.sonatypeOssRepos(_))
72
enablePlugins(ScalaNativePlugin)
83

94
import sbt._

cli/src/sbt-test/integration/cli/project/build.sbt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,3 @@ if (pluginVersion == null)
99
else {
1010
addSbtPlugin("org.scala-native" % "sbt-scala-native" % pluginVersion)
1111
}
12-
resolvers ++= sys.props
13-
.get("scalanative.build.staging.resolvers")
14-
.toList
15-
.flatMap(_.split(","))
16-
.flatMap(Resolver.sonatypeOssRepos(_))

cli/src/sbt-test/integration/standalone/build.sbt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ scalaVersion := {
2222
)
2323
else scalaVersion
2424
}
25-
resolvers ++= sys.props
26-
.get("scalanative.build.staging.resolvers")
27-
.toList
28-
.flatMap(_.split(","))
29-
.flatMap(Resolver.sonatypeOssRepos(_))
3025

3126
runScript := {
3227
val scriptName +: rawArgs = spaceDelimited("<arg>").parsed.toSeq

0 commit comments

Comments
 (0)