Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow arbitrary override of settings #293

Open
jroper opened this issue Apr 2, 2014 · 2 comments
Open

Allow arbitrary override of settings #293

jroper opened this issue Apr 2, 2014 · 2 comments

Comments

@jroper
Copy link
Contributor

jroper commented Apr 2, 2014

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:

val task = 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).

@avakhrenev
Copy link

+1. It would be also great if inspect idea would show all the keys which are used to generate idea project

@wsargent
Copy link

wsargent commented Aug 6, 2016

IDEA has direct support for Play / SBT now, so this is no longer needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants