Skip to content

Commit 7ef6be7

Browse files
author
Antonio Cunei
committed
Reset the publish task to the standard value
This should fix #158, and provide support for Bintray-enabled projects without workarounds.
1 parent 700f7ae commit 7ef6be7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

plugin/src/main/scala/com/typesafe/dbuild/plugin/DBuildRunner.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,12 @@ object DBuildRunner {
382382
def fixInterProjectResolver2 =
383383
fixGeneric2(Keys.projectResolver, "Disabling inter-project resolver") { _ map { _ => new RawRepository(new ProjectResolver("inter-project", Map.empty)) } }
384384

385+
// Some projects or plugins modify the "publish" task (for instance, to use Bintray),
386+
// but we need the task to point to the standard definition, so that we can publish
387+
// the files to the local directories
388+
def fixStandardPublish2 =
389+
fixGeneric2(Keys.publish, "Resetting publish task") { _ map { _ => sbt.Classpaths.publishTask(Keys.publishConfiguration, Keys.deliver) } }
390+
385391
// alternate version, which only removes the artifacts that are not part
386392
// of the selected subprojects. Might be more suitable for setupcmd; in this case,
387393
// local-publish-repo should not be added to the list of resolvers.
@@ -666,6 +672,7 @@ object DBuildRunner {
666672

667673
private def preparePublishSettings(in: BuildInput, log: ConsoleLogger, oldSettings: Seq[Setting[_]]) =
668674
Seq[Fixer](
675+
fixStandardPublish2,
669676
fixPublishTos2(in.outRepo.getAbsoluteFile),
670677
fixPGPs2,
671678
fixVersions2(in)) flatMap { _(oldSettings, log) }

0 commit comments

Comments
 (0)