I don't think InputTasks will meet your needs there. They are a way to define the task to run based on user input. They cannot change other settings or tasks, though.
You might define settings that define the build type and whether to use elide. For example,
val useElide = SettingKey[Boolean]("use-elide", "...description...")
val cppBuildType = SettingKey[BuildType]("cpp-build-type", "...description...")
sealed trait BuildType
case object Release extends BuildType
case object Debug extends BuildType
Then, your tasks that should have different behavior based on the build type would take it as input. For the compiler options example,
scalacOptions <++= useElide map { flag =>
if(flag) Seq("-Xelide-below", "800") else Nil
}
You can use the 'set' command (see 'help set') to change a setting from the command line. For example,
$ sbt
> set every cppBuildType := Release
That will set the build type in all projects to be a release. You can verify it took effect with 'show' or 'inspect':
> show cpp-build-type
> show compile:scalac-options
-Mark
> Thank you
>
> Michael
>
> --
> 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/-/qqS3eTsAbI0J.
> 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.
>