-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added template project. Shortened readme.
- Loading branch information
Showing
4 changed files
with
20 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ target | |
lib_managed | ||
src_managed | ||
/ext | ||
.lib | ||
.lib | ||
/template-project/project/boot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,23 +100,15 @@ Current -help output: | |
shows precedence: JAVA_OPTS lowest, command line options highest. | ||
|
||
|
||
## Template project | ||
## Template project ## | ||
|
||
To gain access to the awesome, simply add the following <project>/project/plugins/project/Build.scala file: | ||
To see the plugin in action, including the thrilling custom sbt command "help-names": | ||
|
||
import sbt._ | ||
object PluginDef extends Build { | ||
override def projects = Seq(root) | ||
lazy val root = Project("plugins", file(".")) dependsOn(extras) | ||
lazy val extras = uri("git://github.com/jsuereth/sbt-extras") | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jsuereth
Contributor
|
||
} | ||
cd template-project && ../sbt -sbt-rc help-names | ||
|
||
The template files are: | ||
|
||
Now to continue the amazement, simply extend the TemplateBuild trait in your project. For example, in your | ||
<project>/project/Build.scala file add: | ||
|
||
import sbt._ | ||
import template.TemplateBuild | ||
|
||
object MyAwesomeBuild extends TemplateBuild {} | ||
project/plugins/project/Build.scala # you can use this as-is if you want | ||
project/Build.scala # this is a starting point for your real Build.scala | ||
|
||
The Template build isn't quite finished. There will most likely be a build.sbt DSL variant that does not require a project scala file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import sbt._ | ||
import template.TemplateBuild | ||
|
||
object MyAwesomeBuild extends TemplateBuild {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import sbt._ | ||
|
||
object PluginDef extends Build { | ||
override def projects = Seq(root) | ||
lazy val root = Project("plugins", file(".")) dependsOn(extras) | ||
lazy val extras = uri("git://github.com/paulp/sbt-extras") | ||
} |
Hey, love the new template project, great idea (for testing I had one locally). I think this documentation might still be useful for folk who don't know how to have SBT pull a plugin from source, unless you plan to publish it. I was hoping to get a few people trying out the DSL to see if they like it.