Skip to content

Commit 828a113

Browse files
committed
Fix sonatype publishing
1 parent 457392b commit 828a113

File tree

5 files changed

+86
-69
lines changed

5 files changed

+86
-69
lines changed

.mobala/steps/run-publish-scala.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function run-publish-scala() {
2323
"$VERSION_COMMAND clean" \
2424
"$VERSION_COMMAND package" \
2525
"$VERSION_COMMAND publishSigned" \
26-
sonatypeBundleRelease || exit 1
26+
sonaUpload sonaRelease || exit 1
2727
fi
2828

29-
}
29+
}

build.sbt

Lines changed: 49 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ lazy val `idealingua-v1-model` = project.in(file("idealingua-v1/idealingua-v1-mo
3030
)
3131
.settings(
3232
crossScalaVersions := Seq(
33-
"3.3.5",
33+
"3.3.6",
3434
"2.13.16",
3535
"2.12.20"
3636
),
@@ -158,7 +158,7 @@ lazy val `idealingua-v1-model` = project.in(file("idealingua-v1/idealingua-v1-mo
158158
"-Ycache-plugin-class-loader:always",
159159
"-Ycache-macro-class-loader:last-modified"
160160
)
161-
case (_, "3.3.5") => Seq(
161+
case (_, "3.3.6") => Seq(
162162
"-release:8",
163163
"-Ykind-projector:underscores",
164164
"-Yretain-trees",
@@ -326,7 +326,7 @@ lazy val `idealingua-v1-core` = project.in(file("idealingua-v1/idealingua-v1-cor
326326
"-Ycache-plugin-class-loader:always",
327327
"-Ycache-macro-class-loader:last-modified"
328328
)
329-
case (_, "3.3.5") => Seq(
329+
case (_, "3.3.6") => Seq(
330330
"-release:8",
331331
"-Ykind-projector:underscores",
332332
"-Yretain-trees",
@@ -382,7 +382,7 @@ lazy val `idealingua-v1-runtime-rpc-scala` = project.in(file("idealingua-v1/idea
382382
)
383383
.settings(
384384
crossScalaVersions := Seq(
385-
"3.3.5",
385+
"3.3.6",
386386
"2.13.16",
387387
"2.12.20"
388388
),
@@ -510,7 +510,7 @@ lazy val `idealingua-v1-runtime-rpc-scala` = project.in(file("idealingua-v1/idea
510510
"-Ycache-plugin-class-loader:always",
511511
"-Ycache-macro-class-loader:last-modified"
512512
)
513-
case (_, "3.3.5") => Seq(
513+
case (_, "3.3.6") => Seq(
514514
"-release:8",
515515
"-Ykind-projector:underscores",
516516
"-Yretain-trees",
@@ -557,7 +557,7 @@ lazy val `idealingua-v1-runtime-rpc-http4s` = project.in(file("idealingua-v1/ide
557557
)
558558
.settings(
559559
crossScalaVersions := Seq(
560-
"3.3.5",
560+
"3.3.6",
561561
"2.13.16",
562562
"2.12.20"
563563
),
@@ -685,7 +685,7 @@ lazy val `idealingua-v1-runtime-rpc-http4s` = project.in(file("idealingua-v1/ide
685685
"-Ycache-plugin-class-loader:always",
686686
"-Ycache-macro-class-loader:last-modified"
687687
)
688-
case (_, "3.3.5") => Seq(
688+
case (_, "3.3.6") => Seq(
689689
"-release:8",
690690
"-Ykind-projector:underscores",
691691
"-Yretain-trees",
@@ -872,7 +872,7 @@ lazy val `idealingua-v1-transpilers` = project.in(file("idealingua-v1/idealingua
872872
"-Ycache-plugin-class-loader:always",
873873
"-Ycache-macro-class-loader:last-modified"
874874
)
875-
case (_, "3.3.5") => Seq(
875+
case (_, "3.3.6") => Seq(
876876
"-release:8",
877877
"-Ykind-projector:underscores",
878878
"-Yretain-trees",
@@ -914,7 +914,7 @@ lazy val `idealingua-v1-test-defs` = project.in(file("idealingua-v1/idealingua-v
914914
)
915915
.settings(
916916
crossScalaVersions := Seq(
917-
"3.3.5",
917+
"3.3.6",
918918
"2.13.16",
919919
"2.12.20"
920920
),
@@ -1042,7 +1042,7 @@ lazy val `idealingua-v1-test-defs` = project.in(file("idealingua-v1/idealingua-v
10421042
"-Ycache-plugin-class-loader:always",
10431043
"-Ycache-macro-class-loader:last-modified"
10441044
)
1045-
case (_, "3.3.5") => Seq(
1045+
case (_, "3.3.6") => Seq(
10461046
"-release:8",
10471047
"-Ykind-projector:underscores",
10481048
"-Yretain-trees",
@@ -1078,7 +1078,7 @@ lazy val `idealingua-v1-runtime-rpc-typescript` = project.in(file("idealingua-v1
10781078
)
10791079
.settings(
10801080
crossScalaVersions := Seq(
1081-
"3.3.5",
1081+
"3.3.6",
10821082
"2.13.16",
10831083
"2.12.20"
10841084
),
@@ -1206,7 +1206,7 @@ lazy val `idealingua-v1-runtime-rpc-typescript` = project.in(file("idealingua-v1
12061206
"-Ycache-plugin-class-loader:always",
12071207
"-Ycache-macro-class-loader:last-modified"
12081208
)
1209-
case (_, "3.3.5") => Seq(
1209+
case (_, "3.3.6") => Seq(
12101210
"-release:8",
12111211
"-Ykind-projector:underscores",
12121212
"-Yretain-trees",
@@ -1242,7 +1242,7 @@ lazy val `idealingua-v1-runtime-rpc-go` = project.in(file("idealingua-v1/idealin
12421242
)
12431243
.settings(
12441244
crossScalaVersions := Seq(
1245-
"3.3.5",
1245+
"3.3.6",
12461246
"2.13.16",
12471247
"2.12.20"
12481248
),
@@ -1370,7 +1370,7 @@ lazy val `idealingua-v1-runtime-rpc-go` = project.in(file("idealingua-v1/idealin
13701370
"-Ycache-plugin-class-loader:always",
13711371
"-Ycache-macro-class-loader:last-modified"
13721372
)
1373-
case (_, "3.3.5") => Seq(
1373+
case (_, "3.3.6") => Seq(
13741374
"-release:8",
13751375
"-Ykind-projector:underscores",
13761376
"-Yretain-trees",
@@ -1406,7 +1406,7 @@ lazy val `idealingua-v1-runtime-rpc-csharp` = project.in(file("idealingua-v1/ide
14061406
)
14071407
.settings(
14081408
crossScalaVersions := Seq(
1409-
"3.3.5",
1409+
"3.3.6",
14101410
"2.13.16",
14111411
"2.12.20"
14121412
),
@@ -1534,7 +1534,7 @@ lazy val `idealingua-v1-runtime-rpc-csharp` = project.in(file("idealingua-v1/ide
15341534
"-Ycache-plugin-class-loader:always",
15351535
"-Ycache-macro-class-loader:last-modified"
15361536
)
1537-
case (_, "3.3.5") => Seq(
1537+
case (_, "3.3.6") => Seq(
15381538
"-release:8",
15391539
"-Ykind-projector:underscores",
15401540
"-Yretain-trees",
@@ -1706,7 +1706,7 @@ lazy val `idealingua-v1-compiler` = project.in(file("idealingua-v1/idealingua-v1
17061706
"-Ycache-plugin-class-loader:always",
17071707
"-Ycache-macro-class-loader:last-modified"
17081708
)
1709-
case (_, "3.3.5") => Seq(
1709+
case (_, "3.3.6") => Seq(
17101710
"-release:8",
17111711
"-Ykind-projector:underscores",
17121712
"-Yretain-trees",
@@ -1811,32 +1811,40 @@ lazy val `idealingua-v1` = (project in file("."))
18111811
),
18121812
crossScalaVersions := Nil,
18131813
ThisBuild / organization := "io.7mind.izumi",
1814-
sonatypeProfileName := "io.7mind",
1815-
sonatypeSessionName := s"[sbt-sonatype] ${name.value} ${version.value} ${java.util.UUID.randomUUID}",
1816-
ThisBuild / publishTo :=
1817-
(if (!isSnapshot.value) {
1818-
sonatypePublishToBundle.value
1814+
ThisBuild / publishTo := {
1815+
// https://github.com/sbt/sbt/issues/8131
1816+
if (isSnapshot.value) {
1817+
Some(
1818+
"central-snapshots" at "https://central.sonatype.com/repository/maven-snapshots/"
1819+
)
18191820
} else {
1820-
Some(Opts.resolver.sonatypeSnapshots)
1821-
})
1822-
,
1823-
ThisBuild / credentials ++=
1824-
{
1825-
val credTarget = Path.userHome / ".sbt" / "secrets" / "credentials.sonatype-nexus.properties"
1826-
if (credTarget.exists) {
1827-
Seq(Credentials(credTarget))
1828-
} else {
1829-
Seq.empty
1821+
localStaging.value
1822+
}
18301823
}
1824+
,
1825+
ThisBuild / credentials ++= {
1826+
val credTarget = Path.userHome / ".sbt" / "secrets" / "credentials.sonatype-new.properties"
1827+
if (credTarget.exists) {
1828+
Seq(Credentials(credTarget))
1829+
} else {
1830+
Seq.empty
1831+
}
18311832
},
1832-
ThisBuild / credentials ++=
1833-
{
1834-
val credTarget = file(".") / ".secrets" / "credentials.sonatype-nexus.properties"
1835-
if (credTarget.exists) {
1836-
Seq(Credentials(credTarget))
1837-
} else {
1838-
Seq.empty
1839-
}
1833+
ThisBuild / credentials ++= {
1834+
val credTarget = Path.userHome / ".sbt" / "secrets" / "credentials.sonatype-nexus.properties"
1835+
if (credTarget.exists) {
1836+
Seq(Credentials(credTarget))
1837+
} else {
1838+
Seq.empty
1839+
}
1840+
},
1841+
ThisBuild / credentials ++= {
1842+
val credTarget = file(".") / ".secrets" / "credentials.sonatype-nexus.properties"
1843+
if (credTarget.exists) {
1844+
Seq(Credentials(credTarget))
1845+
} else {
1846+
Seq.empty
1847+
}
18401848
},
18411849
refreshFlakeTask := {
18421850
val log = streams.value.log
@@ -1871,7 +1879,7 @@ lazy val `idealingua-v1` = (project in file("."))
18711879
ThisBuild / scalacOptions += """-Xmacro-settings:sbt-js-version=1.0.2""",
18721880
ThisBuild / scalacOptions += """-Xmacro-settings:crossproject-version=1.3.2""",
18731881
ThisBuild / scalacOptions += s"-Xmacro-settings:is-ci=${insideCI.value}",
1874-
libraryDependencies += "io.7mind.izumi.sbt" % "sbtgen_2.13" % "0.0.104" % Provided,
1882+
libraryDependencies += "io.7mind.izumi.sbt" % "sbtgen_2.13" % "0.0.107" % Provided,
18751883
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
18761884
)
18771885
.enablePlugins(IzumiPlugin)

project/Deps.sc

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import $ivy.`io.7mind.izumi.sbt:sbtgen_2.13:0.0.104`
1+
import $ivy.`io.7mind.izumi.sbt:sbtgen_2.13:0.0.107`
22
import izumi.sbtgen._
33
import izumi.sbtgen.model._
44

@@ -226,35 +226,44 @@ object Idealingua {
226226
final val rootSettings = Defaults.SbtMetaRootOptions ++ Defaults.RootOptions ++ Seq(
227227
"crossScalaVersions" := "Nil".raw,
228228
"organization" in SettingScope.Build := "io.7mind.izumi",
229-
"sonatypeProfileName" := "io.7mind",
230-
"sonatypeSessionName" := """s"[sbt-sonatype] ${name.value} ${version.value} ${java.util.UUID.randomUUID}"""".raw,
231229
"publishTo" in SettingScope.Build :=
232-
"""
233-
|(if (!isSnapshot.value) {
234-
| sonatypePublishToBundle.value
230+
"""{
231+
| // https://github.com/sbt/sbt/issues/8131
232+
| if (isSnapshot.value) {
233+
| Some(
234+
| "central-snapshots" at "https://central.sonatype.com/repository/maven-snapshots/"
235+
| )
235236
| } else {
236-
| Some(Opts.resolver.sonatypeSnapshots)
237-
|})
237+
| localStaging.value
238+
| }
239+
|}
238240
|""".stripMargin.raw,
239241
"credentials" in SettingScope.Build ++=
240-
"""
241-
|{
242-
|val credTarget = Path.userHome / ".sbt" / "secrets" / "credentials.sonatype-nexus.properties"
243-
|if (credTarget.exists) {
244-
| Seq(Credentials(credTarget))
245-
|} else {
246-
| Seq.empty
247-
|}
242+
"""{
243+
| val credTarget = Path.userHome / ".sbt" / "secrets" / "credentials.sonatype-new.properties"
244+
| if (credTarget.exists) {
245+
| Seq(Credentials(credTarget))
246+
| } else {
247+
| Seq.empty
248+
| }
248249
|}""".stripMargin.raw,
249250
"credentials" in SettingScope.Build ++=
250-
"""
251-
|{
252-
|val credTarget = file(".") / ".secrets" / "credentials.sonatype-nexus.properties"
253-
|if (credTarget.exists) {
254-
| Seq(Credentials(credTarget))
255-
|} else {
256-
| Seq.empty
257-
|}
251+
"""{
252+
| val credTarget = Path.userHome / ".sbt" / "secrets" / "credentials.sonatype-nexus.properties"
253+
| if (credTarget.exists) {
254+
| Seq(Credentials(credTarget))
255+
| } else {
256+
| Seq.empty
257+
| }
258+
|}""".stripMargin.raw,
259+
"credentials" in SettingScope.Build ++=
260+
"""{
261+
| val credTarget = file(".") / ".secrets" / "credentials.sonatype-nexus.properties"
262+
| if (credTarget.exists) {
263+
| Seq(Credentials(credTarget))
264+
| } else {
265+
| Seq.empty
266+
| }
258267
|}""".stripMargin.raw,
259268
"refreshFlakeTask" := """{
260269
val log = streams.value.log

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version = 1.10.11
1+
sbt.version = 1.11.0-RC2

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
////////////////////////////////////////////////////////////////////////////////
66

7-
addSbtPlugin("io.7mind.izumi.sbt" % "sbt-izumi" % "0.0.104")
7+
addSbtPlugin("io.7mind.izumi.sbt" % "sbt-izumi" % "0.0.107")
88

99
addSbtPlugin("com.github.sbt" % "sbt-pgp" % PV.sbt_pgp)
1010

0 commit comments

Comments
 (0)