In SBT, how to use addSbtPlugin with a Github url?

Currently, I used a plugin like this:

addSbtPlugin("com.tuplejump" % "sbt-yeoman" % "0.7.1") 

But then I will unlock this plugin on github (say, https://github.com/myname/play-yeoman.git ) and make some changes, which will make it easier to use my forked version of the plugin? Should I register this fork in the maven / ivy repository?

Thanks!

+7
scala playframework sbt
source share
2 answers

Using SBT 0.13.8, I was able to replace the next line in mine. /project/plugins.sbt:

 addSbtPlugin("net.ground5hark.sbt" %% "sbt-concat" % "0.1.8") 

with the following two lines

 lazy val root = (project in file(".")).dependsOn(concatPlugin) lazy val concatPlugin = uri("https://github.com/ground5hark/sbt-concat.git#342acc34195438799b8a278fda94b126238aae17") 

There were no other steps. Also, note that the git URI has a commit hash at the end. This is very useful for the project to use the specific version of the source known in the work, rather than any last unknown state of the source.

+3
source share

Follow these steps:

  • Add the -SNAPSHOT suffix to the plugin version, i.e. version := "1.0.0-SNAPSHOT"
  • Run sbt publishLocal from the command line.
  • Link to the snapshot version of your plugins.sbt .
0
source share

All Articles