diff --git a/build.sbt b/build.sbt index 92ef1a2..dabd22c 100644 --- a/build.sbt +++ b/build.sbt @@ -11,8 +11,6 @@ scriptedLaunchOpts := { scriptedBufferLog := false -Global / onChangedBuildSource := ReloadOnSourceChanges - description := "SBT plugin for publishing maven compatible POM for SBT plugins" developers := List( Developer( diff --git a/project/build.properties b/project/build.properties index c8fcab5..c0bab04 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.2 +sbt.version=1.2.8 diff --git a/project/plugins.sbt b/project/plugins.sbt index ac69f57..1207671 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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") diff --git a/src/main/scala/sbtconsistent/SbtConsistentPlugin.scala b/src/main/scala/sbtconsistent/SbtConsistentPlugin.scala index 8f29825..3ab882f 100644 --- a/src/main/scala/sbtconsistent/SbtConsistentPlugin.scala +++ b/src/main/scala/sbtconsistent/SbtConsistentPlugin.scala @@ -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 @@ -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 @@ -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 @@ -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, )