First time developing an sbt plugin: Is this plugin ok? Where to publish it?

57 views
Skip to first unread message

Esko Luontola

unread,
Aug 3, 2013, 5:03:53 PM8/3/13
to simple-b...@googlegroups.com
Hi,

I just wrote my first sbt plugin (for sbt 0.13), and would be very pleased if someone more experienced in writing them would do a code review on the following one class (the only class in the plugin). This plugin implements sbt integration for running tests using Jumi (http://jumi.fi/).


Here are some specific questions:

- Where should I upload the plugin? The easiest for me would be to Maven Central, but there are no sbt libraries there, so Maven Central won't allow deploying the plugin there. What's the official repository for sbt plugins and how to get deploy access there?

- Plugin.settings is deprecated and it recommends to use projectSettings or buildSettings. How to make a decision between which one to use?

- Or should I not override Plugin.settings and require the user to type SbtJumiPlugin.jumiSettings explicitly, the same way as for example ScriptedPlugin does it?

Doug Tangren

unread,
Aug 3, 2013, 6:19:50 PM8/3/13
to simple-b...@googlegroups.com


On Aug 3, 2013 5:03 PM, "Esko Luontola" <esko.l...@gmail.com> wrote:
>
> Hi,
>
> I just wrote my first sbt plugin (for sbt 0.13), and would be very pleased if someone more experienced in writing them would do a code review on the following one class (the only class in the plugin). This plugin implements sbt integration for running tests using Jumi (http://jumi.fi/).
>
> https://github.com/orfjackal/sbt-jumi/blob/master/src/main/scala/fi/jumi/sbt/SbtJumiPlugin.scala
>
> Here are some specific questions:
>
> - Where should I upload the plugin? The easiest for me would be to Maven Central, but there are no sbt libraries there, so Maven Central won't allow deploying the plugin there. What's the official repository for sbt plugins and how to get deploy access there?
>

publishTo := Some(Classpaths.sbtPluginReleases)

Then it will automatically be resolvable.

> - Plugin.settings is deprecated and it recommends to use projectSettings or buildSettings. How to make a decision between which one to use?
>

I recommend you don't do this. It gives users no control

> - Or should I not override Plugin.settings and require the user to type SbtJumiPlugin.jumiSettings explicitly, the same way as for example ScriptedPlugin does it?

Do this instead

>
> --
> You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-t...@googlegroups.com.
> To post to this group, send email to simple-b...@googlegroups.com.
> Visit this group at http://groups.google.com/group/simple-build-tool.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

Esko Luontola

unread,
Aug 5, 2013, 2:54:20 PM8/5/13
to simple-b...@googlegroups.com
Thanks for the help. I've now released the plugin: https://github.com/orfjackal/sbt-jumi#readme
Reply all
Reply to author
Forward
0 new messages