Skip to content

Commit

Permalink
Merge pull request #8 from nrinaudo/downgrade-sbt-1.2.8
Browse files Browse the repository at this point in the history
Downgrade to SBT 1.2.8
  • Loading branch information
ScalaWilliam authored Oct 1, 2022
2 parents 53182ed + c13bfef commit 8e52654
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
2 changes: 0 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ scriptedLaunchOpts := {

scriptedBufferLog := false

Global / onChangedBuildSource := ReloadOnSourceChanges

description := "SBT plugin for publishing maven compatible POM for SBT plugins"
developers := List(
Developer(
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.6.2
sbt.version=1.2.8
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
addSbtPlugin("com.scalawilliam.esbeetee" % "sbt-vspp" % "0.4.11")
//addSbtPlugin("com.scalawilliam.esbeetee" % "sbt-vspp" % "0.4.11")

addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.8")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2")
33 changes: 17 additions & 16 deletions src/main/scala/sbtconsistent/SbtConsistentPlugin.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package sbtconsistent

import sbt.{Def, *}
import sbt.Keys.*
import sbt.{Def, _}
import sbt.Keys._

object SbtConsistentPlugin extends AutoPlugin {
// override def requires = sbt.plugins.SbtPlugin
Expand All @@ -16,9 +16,9 @@ object SbtConsistentPlugin extends AutoPlugin {
lazy val consistentPluginArtifacts = taskKey[Map[Artifact, File]]("Packages all artifacts for consistently publishing.")
}

import autoImport.*
import autoImport._

override lazy val globalSettings: Seq[Setting[?]] = Seq(
override lazy val globalSettings: Seq[Setting[_]] = Seq(
moduleIdTransformer := Seq(
(m: ModuleID) => {
val sbtV = (pluginCrossBuild / sbtBinaryVersion).value
Expand All @@ -31,7 +31,7 @@ object SbtConsistentPlugin extends AutoPlugin {
),
)

override lazy val projectSettings: Seq[Setting[?]] = Seq(
override lazy val projectSettings: Seq[Setting[_]] = Seq(

sbtCrossArtifactName := {
val artifactName = artifact.value.name
Expand Down Expand Up @@ -69,17 +69,18 @@ object SbtConsistentPlugin extends AutoPlugin {
// add the new pom to the list of artifact to be published.
artifacts += (makeProperPom / artifact).value,

consistentPluginArtifacts :=
(if (sbtPlugin.value) {
Map(
(Compile / packageBin / artifact).value.withName(sbtCrossArtifactName.value) -> (Compile / packageBin).value,
(Compile / packageDoc / artifact).value.withName(sbtCrossArtifactName.value) -> (Compile / packageDoc).value,
(Compile / packageSrc / artifact).value.withName(sbtCrossArtifactName.value) -> (Compile / packageSrc).value,
(makeProperPom / artifact).value -> makeProperPom.value)
} else {
Map.empty[Artifact, File]
}),

consistentPluginArtifacts := Def.taskDyn {
(if (sbtPlugin.value) Def.task {
Map(
(Compile / packageBin / artifact).value.withName(sbtCrossArtifactName.value) -> (Compile / packageBin).value,
(Compile / packageDoc / artifact).value.withName(sbtCrossArtifactName.value) -> (Compile / packageDoc).value,
(Compile / packageSrc / artifact).value.withName(sbtCrossArtifactName.value) -> (Compile / packageSrc).value,
(makeProperPom / artifact).value -> makeProperPom.value)

} else Def.task {
Map.empty[Artifact, File]
})
}.value,
packagedArtifacts ++= consistentPluginArtifacts.value,
)

Expand Down

0 comments on commit 8e52654

Please sign in to comment.