You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sbt idea plugin provides a command, not a task, which means you can't arbitrarily override any setting/task it depends on. An alternative to this, would be to define a dummy task, eg:
valtask=TaskKey[Unit]("idea")
And then when reading config, it would:
unmanagedResourceDirectories in idea in Compile
If defined specifically for idea in a given project, you would get that value, otherwise it would fallback to the Compile config.
What this would allow is users to override any arbitrary value, so that they could configure sbt idea to their hearts content, without impacting their sbt build at all.
The specific use case I have in mind for this is in Play, we are moving to a 2 stage assets process, stage 1 will be on the dev mode classpath, and it contains things like compiled coffeescript/less files, things that must be done in dev mode, and stage 2 will contain things like minimised js, gzipped files, md5s, requirejs optimisation, as well as all original js/css/coffescript/less/source maps (if wanted, these can also be blocked if you don't want those files making it into prod). The key to making this work is that none of this gets put into sbts resource/source/classes directories, they are kept separate, and this is achieved by adding the assets to products in Runtime for dev mode, and products in Compile for distribution (which is used to generate the jar). The idea plugin can't/shouldn't depend on these keys because it requires the project to be fully compilable. So what would seem to make sense is to add these directories to unmanagedResourceDirectories in idea in Test, so that they are on the test classpath during testing (and therefore selenium tests that depend on these assets being on the classpath will work).
The text was updated successfully, but these errors were encountered:
The sbt idea plugin provides a command, not a task, which means you can't arbitrarily override any setting/task it depends on. An alternative to this, would be to define a dummy task, eg:
And then when reading config, it would:
unmanagedResourceDirectories in idea in Compile
If defined specifically for
idea
in a given project, you would get that value, otherwise it would fallback to theCompile
config.What this would allow is users to override any arbitrary value, so that they could configure sbt idea to their hearts content, without impacting their sbt build at all.
The specific use case I have in mind for this is in Play, we are moving to a 2 stage assets process, stage 1 will be on the dev mode classpath, and it contains things like compiled coffeescript/less files, things that must be done in dev mode, and stage 2 will contain things like minimised js, gzipped files, md5s, requirejs optimisation, as well as all original js/css/coffescript/less/source maps (if wanted, these can also be blocked if you don't want those files making it into prod). The key to making this work is that none of this gets put into sbts resource/source/classes directories, they are kept separate, and this is achieved by adding the assets to
products in Runtime
for dev mode, andproducts in Compile
for distribution (which is used to generate the jar). The idea plugin can't/shouldn't depend on these keys because it requires the project to be fully compilable. So what would seem to make sense is to add these directories tounmanagedResourceDirectories in idea in Test
, so that they are on the test classpath during testing (and therefore selenium tests that depend on these assets being on the classpath will work).The text was updated successfully, but these errors were encountered: