Closed tindzk closed 5 years ago
Here is a partial workaround:
def fixName: String => String = {
case "pinejs2_11" => "pine_sjs0.6_2.11"
case "pinejs2_12" => "pine_sjs0.6_2.12"
case "pinejs2_13" => "pine_sjs0.6_2.13"
case "pinenative2_11" => "pine_native0.3_2.11"
case "pinejvm2_11" => "pine_2.11"
case "pinejvm2_12" => "pine_2.12"
case "pinejvm2_13" => "pine_2.13"
case n => n
}
artifactName := { (sv: ScalaVersion, module: ModuleID, artifact: Artifact) =>
fixName(artifact.name) + "-" + module.revision + "." + artifact.extension
}
name in (Compile, packageBin) := {
val old = (name in (Compile, packageBin)).value
fixName(old.toLowerCase)
}
name in (Compile, packageSrc) := {
val old = (name in (Compile, packageSrc)).value
fixName(old.toLowerCase)
}
name in (Compile, packageDoc) := {
val old = (name in (Compile, packageDoc)).value
fixName(old.toLowerCase)
}
projectID in (Compile, packageBin) := {
val old = (projectID in (Compile, packageBin)).value
old.withName(fixName(old.name))
}
projectID in (Compile, packageSrc) := {
val old = (projectID in (Compile, packageSrc)).value
old.withName(fixName(old.name))
}
projectID in (Compile, packageDoc) := {
val old = (projectID in (Compile, packageDoc)).value
old.withName(fixName(old.name))
}
artifact in (Compile, packageBin) := {
val old = (artifact in (Compile, packageBin)).value
old.withName("pine")
}
artifact in (Compile, packageSrc) := {
val old = (artifact in (Compile, packageSrc)).value
old.withName("pine")
}
artifact in (Compile, packageDoc) := {
val old = (artifact in (Compile, packageDoc)).value
old.withName("pine")
}
The only remaining problem is that one of the artefact names in the Sonatype URL is wrong when I run publishSigned
:
@tindzk Thanks for the report!
I swear at some point I had moduleName
rewired. I don't know how this regressed. Sorry about this.
I think it's due to the incorrect use of ThisBuild / name
. Please see https://github.com/sparsetech/pine/pull/57
I am in the process of publishing Pine to Sonatype. Unfortunately, sbt-projectmatrix uses wrong artefact names:
The correct name would be
pine_2.13-0.1.5.jar
.In the case of Scala Native and Scala.js, we must also include the compiler version:
pine_sjs0.6_2.11-0.1.4.jar
pine_native0.3_2.11-0.1.4.jar