Re: [sbt] Using a source plugin dependency in project build

125 views
Skip to first unread message

Doug Tangren

unread,
Jun 1, 2012, 11:26:03 AM6/1/12
to simple-b...@googlegroups.com


On Fri, Jun 1, 2012 at 10:49 AM, Mike Mckibben <mikemc...@gmail.com> wrote:
Hi,

I was hoping someone could help me out with getting a source plugin dependency working in my project. I'm trying to use the conscript-plugin in my project that does not yet have a build for sbt 0.11.3. Based on all the documentation I've read, I thought that I could compile the plugin from source and use in my project by defining the following under project/project/build.scala:

import sbt._

object PluginDef extends Build {
  override def projects = Seq(root)
  lazy val root = Project("plugins", file(".")) dependsOn(conscript)
  lazy val conscript = uri("git://github.com/n8han/conscript-plugin.git")
}

When I reload my sbt project, everything compiles fine, but the plugin exported tasks are not available (cs-run, etc.). What am I missing?


Adding the plugin just puts it in your build path. To use the plugin's settings. Append the plugins settings to your build definition

seq(conscriptSettings:_*)

for example in your build.sbt

 
--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To view this discussion on the web visit https://groups.google.com/d/msg/simple-build-tool/-/3XVk6RehbuEJ.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

Doug Tangren

unread,
Jun 1, 2012, 11:28:51 AM6/1/12
to simple-b...@googlegroups.com

-Doug Tangren
http://lessis.me


On Fri, Jun 1, 2012 at 11:26 AM, Doug Tangren <d.ta...@gmail.com> wrote:


On Fri, Jun 1, 2012 at 10:49 AM, Mike Mckibben <mikemc...@gmail.com> wrote:
Hi,

I was hoping someone could help me out with getting a source plugin dependency working in my project. I'm trying to use the conscript-plugin in my project that does not yet have a build for sbt 0.11.3. Based on all the documentation I've read, I thought that I could compile the plugin from source and use in my project by defining the following under project/project/build.scala:

import sbt._

object PluginDef extends Build {
  override def projects = Seq(root)
  lazy val root = Project("plugins", file(".")) dependsOn(conscript)
  lazy val conscript = uri("git://github.com/n8han/conscript-plugin.git")
}

When I reload my sbt project, everything compiles fine, but the plugin exported tasks are not available (cs-run, etc.). What am I missing?


Adding the plugin just puts it in your build path. To use the plugin's settings. Append the plugins settings to your build definition

seq(conscriptSettings:_*)

for example in your build.sbt



https://github.com/softprops/ls/blob/master/project/build.scala#L76 for example if you are using a .scala build definition
 

Doug Tangren

unread,
Jun 1, 2012, 12:19:19 PM6/1/12
to simple-b...@googlegroups.com
On Fri, Jun 1, 2012 at 11:47 AM, Mike Mckibben <mikemc...@gmail.com> wrote:
Perfect! Thanks. I knew I was missing something basic.



No problem. Now build something awesome and share it! There's also a list for conscript if you're interested in any kind of announcement https://groups.google.com/forum/?fromgroups#!forum/conscript-scala

 
Reply all
Reply to author
Forward
0 new messages