Re: [sbt] Prepend task to resourceGenerators

28 views
Skip to first unread message

eugene yokota

unread,
Feb 21, 2013, 1:27:40 AM2/21/13
to simple-b...@googlegroups.com
I mentioned <<= in #scala.

resourceGenerators in Compile <<= (gs) { gs =>
  yourGenerator +: gs
}

-eugene

On Wed, Feb 20, 2013 at 7:00 PM, Luka Zakrajšek <tr00...@gmail.com> wrote:
Hi

I want to prepend new task to resourceGenerators. Right now I use this solution:

resourceGenerators in Compile <+= myGenerator,
resourceGenerators
in Compile ~= { gens => gens.last +: gens.init }

Is there any better way?

Best regards,
Luka

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

eugene yokota

unread,
Feb 21, 2013, 1:35:19 AM2/21/13
to simple-b...@googlegroups.com
Oops.

resourceGenerators in Compile <<= (resourceGenerators in Compile, yourGenerator) { (gs, x) =>
  x +: gs
}

-eugene

Josh Suereth

unread,
Feb 21, 2013, 7:44:14 AM2/21/13
to simple-b...@googlegroups.com

You can also do:

resourceGenerators in Compile <+= yourGeneratorTaskKey

Luka Zakrajšek

unread,
Feb 21, 2013, 4:34:17 PM2/21/13
to simple-b...@googlegroups.com
Thank you. Works like a charm.
Reply all
Reply to author
Forward
0 new messages