├── .gitignore
├── LICENSE
├── README.md
├── build.sbt
├── notes
├── 0.1.0.markdown
├── 0.2.0.markdown
└── about.markdown
├── project
├── build.properties
└── plugins.sbt
└── src
├── main
├── ls
│ └── 0.2.0.json
├── plugins
│ └── build.sbt
└── scala
│ └── np.scala
└── sbt-test
└── np
├── cross-sbt-plugin
├── build.sbt
├── fixtures
│ └── build.sbt
├── project
│ ├── build.properties
│ └── plugins.sbt
└── test
├── custom-defaults
├── build.sbt
├── fixtures
│ └── build.sbt
├── project
│ ├── build.properties
│ └── plugins.sbt
└── test
└── simple
├── build.sbt
├── fixtures
└── build.sbt
├── project
├── build.properties
└── plugins.sbt
└── test
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | target
3 | lib_managed
4 | src_managed
5 | project/boot
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-12 Doug Tangren
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # np
2 |
3 | Simple utility for creating new projects in Sbt
4 |
5 | Steps it took to get this project started
6 |
7 | $ touch build.sbt
8 | $ mkdir -p src/{main,test}/scala
9 | $ e build.sbt # fill in the basics (name, organization, version)
10 | $ touch README.md && e README.md
11 | $ sbt
12 | # start coding
13 |
14 | Desired steps to take to start this project
15 |
16 | $ sbt
17 | $ np name:np
18 | # start coding
19 |
20 | ^ No context switching ^.
21 |
22 | Already have a project and want a sub project? No problem.
23 |
24 | $ sbt
25 | $ np name:my-sub-project dir:sub-project-dir
26 |
27 | This will create a new sbt project source tree for a project named my-sub-project under
28 | the directory named sub-project-dir relative you your projects base directory. From your main build configuration you can use this as a stub and reference it as.
29 |
30 | lazy val sub = Project("my-sub-project", file("sub-project-dir"))
31 |
32 | Or remove the generated stub `build.sbt` and just use the generate source tree
33 |
34 | ## Requirements
35 |
36 | - Simple Build Tool
37 | - The burning desire to start your projects quickly
38 |
39 | ## Installation
40 |
41 | In most cases a global installation will make the most sense as the target usage for this plugin is the creation of new projects
42 |
43 |
44 | ### For sbt 0.12 or lower
45 |
46 | For global installation, if you have a `~/.sbt` directory created, in a `~/.sbt/plugins/build.sbt` file add the following
47 |
48 | For local installation, if you have a `~/project` directory created, in a `~/project/build.sbt` file add the following
49 |
50 | addSbtPlugin("me.lessis" % "np" % "0.2.0")
51 |
52 | resolvers += Resolver.url("sbt-plugin-releases",
53 | url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(
54 | Resolver.ivyStylePatterns)
55 |
56 | Or if you prefer, you can call depend on the project reference as a `git` repository.
57 |
58 | import sbt._
59 |
60 | object Plugins extends Build {
61 | lazy val root = Project("root", file(".")) dependsOn(
62 | uri("git://github.com/softprops/np.git#0.2.0")
63 | )
64 | }
65 |
66 | Be sure to _explicitly_ mix np's settings into your build definition.
67 |
68 | seq(npSettings: _*)
69 |
70 | Doing this in a global `.sbt` file under `~/.sbt` (e.g. ~/.sbt/np.sbt) will make `np`'s setting available to all of your sbt projects.
71 |
72 | ### For sbt 0.13+
73 |
74 | If you don't already have one, create an `~/.sbt/0.13/plugins` directory. And inside of it, create an `np.sbt` ( it doesn't matter what you call it ) file containing the line
75 |
76 | addSbtPlugin("me.lessis" % "np" % "0.2.0")
77 |
78 | This will make `npSettings` globally visible to your project definitions.
79 |
80 | If you wish to globally mix in `npSettings`, create a file under `~/.sbt/0.13` called `np.sbt` ( it doesn't matter what you call this either ) containing the line
81 |
82 | seq(npSettings: _*)
83 |
84 | ### Customization
85 |
86 | If you have a lot of projects that use the same ivy organization id (your own) or you always start projects with the same version conventions (a SNAPSHOT), you may want to define your own custom global overrides.
87 |
88 | To do so, in a `~/.sbt/np.sbt` file in sbt 0.12, or `~/.sbt/0.13/np.sbt` file in 0.13, add the following.
89 |
90 | seq(npSettings:_*)
91 |
92 | (NpKeys.defaults in (Compile, NpKeys.np)) ~= {
93 | _.copy(org="me.lessis", version="0.1.0-SNAPSHOT")
94 | }
95 |
96 | See the `np` option reference section below for all available options
97 |
98 | ## Settings
99 |
100 | np # generates a new project given a set of options
101 | scout(for np) # detects potential conflicts with generating a project, recommended before np
102 | usage(for np) # displays usage options
103 | defaults(for np) # default values for options
104 |
105 | In sbt 0.13 you can resolve the scoped settings using `::`
106 |
107 | np::scout
108 | np::usage
109 | np::defaults
110 |
111 | ### np option reference
112 |
113 | `np` generates sbt projects given `key:value` options. Below is a list of current options
114 |
115 | org Project organization. Defaults to defaults key sbt built-in default
116 | name Project name. Defaults to defaults key or sbt built-in default
117 | version Project version. Defaults to defaults key or sbt built-in default
118 | plugin Boolean indicator of whether the project is a plugin project. Defaults to defaults key or false
119 | dir Path to dir where np should generate project. Defaults to defaults key or '.'
120 |
121 | ## Contributing / Issues
122 |
123 | Please post any issues or ideas you have to [np's issues](https://github.com/softprops/np/issues)
124 |
125 | If you like rolling up your sleeves, feel free to fork and create a feature branch
126 |
127 | Doug Tangren (softprops) 2011-12
128 |
--------------------------------------------------------------------------------
/build.sbt:
--------------------------------------------------------------------------------
1 | sbtPlugin := true
2 |
3 | organization := "me.lessis"
4 |
5 | name := "np"
6 |
7 | version <<= sbtVersion { v =>
8 | if (v.startsWith("0.11") || v.startsWith("0.12") || v.startsWith("0.13")) "0.2.0"
9 | else error("unsupported version of sbt %s" format v)
10 | }
11 |
12 | sbtVersion in Global := "0.13.0"
13 |
14 | scalaVersion in Global := "2.10.2"
15 |
16 | scalacOptions += Opts.compile.deprecation
17 |
18 | seq(ScriptedPlugin.scriptedSettings:_*)
19 |
20 | seq(lsSettings:_*)
21 |
22 | (LsKeys.tags in LsKeys.lsync) := Seq("sbt")
23 |
24 | homepage :=
25 | Some(url("https://github.com/softprops/np"))
26 |
27 | description :=
28 | "Generates sbt project source structures"
29 |
30 | licenses <<= (version)(v => Seq(
31 | ("MIT", url("https://github.com/softprops/np/blob/%s/LICENSE".format(v)))
32 | ))
33 |
34 | publishTo := Some(Classpaths.sbtPluginReleases)
35 |
36 | publishMavenStyle := false
37 |
38 | publishArtifact in Test := false
39 |
40 | pomExtra := (
41 |
42 | git@github.com:softprops/np.git
43 | scm:git:git@github.com:softprops/np.git
44 |
45 |
46 |
47 | softprops
48 | Doug Tangren
49 | https://github.com/softprops
50 |
51 |
52 | )
53 |
--------------------------------------------------------------------------------
/notes/0.1.0.markdown:
--------------------------------------------------------------------------------
1 | Initial release. Provides a minimal interface for generating new sbt projects via,... sbt.
2 |
3 | Basic use is to install the plugin globally and start up a new project with
4 |
5 | $ sbt
6 | $ np name:my-project org:com.mypackage version:0.1.0-SNAPSHOT
7 |
8 | This will generate a simple `build.sbt` project for you along with the standard project directory structure for main and test sources.
9 |
10 | For more advanced usage, see the project's [readme](https://github.com/softprops/np) for more info
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/notes/0.2.0.markdown:
--------------------------------------------------------------------------------
1 | # sbt plugin [best practices][bp] certified.
2 |
3 | - Be gone plugin config. Come hither task dependent keys.
4 |
5 | Below is a migration table for the new style of accessing np keys
6 |
7 | np -> np
8 | np:check -> scout(for np) or (scout in (SomeConfig, np))
9 | np:usage -> usage(for np) or (usage in (SomeConfig, np))
10 | np:defaults -> defaults(for np) or (defaults in (SomeConfig, np))
11 |
12 | - New `NpKeys` module for accessing settings
13 |
14 | To access or override settings, use the `NpKeys` module
15 |
16 | (NpKeys.defaults in (Compile, NpKeys.np)) ~= {
17 | _.copy(org => "com.foo")
18 | }
19 |
20 | - [Scripted plugin][sp] tested
21 |
22 | yep, scripted tests are great
23 |
24 | - published for sbt 0.11.0 & 0.11.1
25 |
26 | For now, this plugin is only built for [0.11][sbt11] and [0.11.1][sbt111], which are at this time the latest and greatest version of [sbt][setup].
27 |
28 | Install with `addSbtPlugin("me.lessis" % "np" % "0.2.0")`
29 |
30 | And include settings with `seq(npSettings:_*)`
31 |
32 | For more info, see the project [readme][rm]
33 |
34 | [bp]: https://github.com/harrah/xsbt/wiki/Plugins-Best-Practices
35 | [sp]: eed3si9n.com/testing-sbt-plugins
36 | [setup]: https://github.com/harrah/xsbt/wiki/Setup
37 | [sbt11]: http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/0.11.0/sbt-launch.jar
38 | [sbt111]: http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/0.11.1/sbt-launch.jar
39 | [rm]: https://github.com/softprops/np#readme
40 |
--------------------------------------------------------------------------------
/notes/about.markdown:
--------------------------------------------------------------------------------
1 | [np][np] makes sbt new project generation simple, as it should be
2 |
3 | [np]: https://github.com/softprops/np
4 |
--------------------------------------------------------------------------------
/project/build.properties:
--------------------------------------------------------------------------------
1 | sbt.version=0.12.4
2 |
--------------------------------------------------------------------------------
/project/plugins.sbt:
--------------------------------------------------------------------------------
1 | libraryDependencies <+= sbtVersion("org.scala-sbt" % "scripted-plugin" % _)
2 |
3 | addSbtPlugin("me.lessis" % "ls-sbt" % "0.1.2")
4 |
5 | addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
6 |
--------------------------------------------------------------------------------
/src/main/ls/0.2.0.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "organization":"me.lessis",
4 | "name":"np",
5 | "version":"0.2.0",
6 | "description":"Generates sbt project source structures",
7 | "site":"https://github.com/softprops/np",
8 | "tags":["sbt"],
9 | "docs":"",
10 | "licenses": [{
11 | "name": "MIT",
12 | "url": "https://github.com/softprops/np/blob/0.2.0/LICENSE"
13 | }],
14 | "resolvers": ["http://scala-tools.org/repo-releases"],
15 | "dependencies": [{
16 | "organization":"org.scala-tools.sbt",
17 | "name": "scripted-sbt_2.9.1",
18 | "version": "0.11.2"
19 | }],
20 | "scalas": ["2.9.1"],
21 | "sbt": true
22 | }
--------------------------------------------------------------------------------
/src/main/plugins/build.sbt:
--------------------------------------------------------------------------------
1 | libraryDependencies <+= (sbtVersion) { sv =>
2 | "net.databinder" %% "posterous-sbt" % ("0.3.0_sbt" + sv)
3 | }
4 |
--------------------------------------------------------------------------------
/src/main/scala/np.scala:
--------------------------------------------------------------------------------
1 | package np
2 |
3 | import sbt._
4 | import Def.Initialize
5 |
6 | case class Defaults(org: String, name: String, version: String,
7 | plugin: Boolean = false, dir: String = ".")
8 |
9 | private object BuildSbt {
10 |
11 | private val SbtVersion = "{sbtVersion}"
12 |
13 | /** Handles cross sbt versioning. */
14 | private def versionBind(version: String, plugin: Boolean) = {
15 | if (!plugin) """:= "%s"""".format(version)
16 | else {
17 | if (version.contains(SbtVersion)) {
18 | """<<= sbtVersion("%s" format _)""".format(version.replace(SbtVersion, "%s"))
19 | } else """:= "%s"""".format(version)
20 | }
21 | }
22 |
23 | def apply(plugin: Boolean, org: String, name: String, version: String) =
24 | """%sorganization := "%s"
25 | |
26 | |name := "%s"
27 | |
28 | |version %s
29 | |""".stripMargin.format(
30 | if(plugin) "sbtPlugin := true\n\n" else "",
31 | org,
32 | name,
33 | versionBind(version, plugin)
34 | )
35 | }
36 |
37 | private object Usage {
38 | val display = """
39 | |Usage: : : ...
40 | |
41 | |all key arguments have default values
42 | |
43 | |Keys
44 | | org Project organization. Defaults to sbt built-in default
45 | | name Project name. Defaults to sbt built-in default
46 | | version Project version. Defaults to sbt built-in default
47 | | plugin Boolean indicator of whether the project is a plugin project. Defaults to false
48 | | dir Path to dir where np should generate project. Defaults to '.'
49 | |""".stripMargin
50 | }
51 |
52 | object Plugin extends sbt.Plugin {
53 | import sbt.Keys._
54 | import NpKeys.{ np => npkey, _ => _ }
55 | import java.io.File
56 | import java.lang.Boolean.{ parseBoolean => bool }
57 |
58 | object NpKeys {
59 | val np = InputKey[Unit]("np", "Sbt project generator")
60 | val defaults = SettingKey[Defaults]("defaults", "Default options used to generate projects")
61 | val scout = InputKey[Unit]("scout", "Does a dry run to check for conflicts")
62 | val usage = TaskKey[Unit]("usage", "Displays np usage info")
63 | }
64 |
65 | private def extract(args: Seq[String], pbase: File, defaults: Defaults) = {
66 |
67 | val Name = """name\:(\S+)""".r
68 | val Vers = """version\:(\S+)""".r
69 | val Org = """org\:(\S+)""".r
70 | val Plgin = """plugin\:(\S+)""".r
71 | val Dir = """dir\:(\S+)""".r
72 |
73 | def first[T](default: T)(pf: PartialFunction[String, T]) =
74 | args.collect(pf).headOption.getOrElse(default)
75 |
76 | val (p, o, n, v, d) = (
77 | first(false) { case Plgin(p) => bool(p) },
78 | first(defaults.org) { case Org(o) => o },
79 | first(defaults.name) { case Name(n) => n },
80 | first(defaults.version) { case Vers(v) => v },
81 | first(defaults.dir) { case Dir(d) => d }
82 | )
83 |
84 | (BuildSbt(p, o, n, v), d match {
85 | case "." => pbase
86 | case path => new File(pbase, path)
87 | })
88 | }
89 |
90 | private def configDirs(conf: String)(base: File) =
91 | Seq("scala", "resources") map { d =>
92 | new File(base, "src/%s/%s".format(conf,d))
93 | }
94 |
95 | private def mainDirs = configDirs("main")_
96 |
97 | private def testDirs = configDirs("test")_
98 |
99 | private def genDirs(base: File): Seq[File] =
100 | mainDirs(base) ++ testDirs(base)
101 |
102 | private def usageTask: Initialize[Task[Unit]] =
103 | (streams) map {
104 | (out) =>
105 | out.log.info(Usage.display)
106 | }
107 |
108 | private lazy val pathsTask =
109 | Def.inputTask {
110 | val args = Def.spaceDelimited("").parsed
111 | val bd = baseDirectory.value
112 | val out = streams.value
113 | val defs = (defaults in npkey).value
114 | val (scpt, base) = extract(args, bd, defs)
115 | val (bf, dirs) = (new File(base, "build.sbt"), genDirs(base))
116 |
117 | //XXX hardcodes relative path
118 | val buildProps = base / "project" / "build.properties"
119 | val toCreateButExisting = dirs :+ bf :+ buildProps filter (_.exists)
120 | (out, toCreateButExisting, scpt, buildProps, bf, dirs)
121 | }
122 |
123 | def npSettings0: Seq[Setting[_]] = Seq(
124 | defaults in npkey := Defaults(name.value, organization.value, version.value),
125 | usage in npkey <<= usageTask,
126 | scout in npkey := {
127 | val tmp = pathsTask.evaluated
128 | val (out, toCreateButExisting, _, _, _, _) = tmp
129 |
130 | toCreateButExisting match {
131 | case Nil =>
132 | out.log.info("Looks good. Run `np` task to generate project.")
133 | case existing =>
134 | out.log.warn("The following files/directories already exist\n\n%s".format(
135 | existing.mkString("\n\n"))
136 | )
137 | }
138 | },
139 | npkey := {
140 | val tmp = pathsTask.evaluated
141 | val (out, toCreateButExisting, scpt, buildProps, bf, dirs) = tmp
142 |
143 | // error out if any of the target files to generate
144 | // already exist
145 | if (toCreateButExisting.nonEmpty) sys.error(
146 | "\nexisting project detected at the path %s" format bf.getParent
147 | )
148 |
149 | IO.write(buildProps, "sbt.version=%s\n" format sbtVersion.value)
150 | out.log.info("Generated build properties")
151 |
152 | IO.write(bf, scpt)
153 | out.log.info("Generated build file")
154 |
155 | IO.createDirectories(dirs)
156 | out.log.info("Generated source directories")
157 | }
158 | )
159 |
160 | def npSettingsIn(c: Configuration) = inConfig(c)(npSettings0)
161 |
162 | // will auto-mix into project settings
163 | def npSettings: Seq[Setting[_]] =
164 | npSettingsIn(Test) ++ npSettingsIn(Compile)
165 | }
166 |
--------------------------------------------------------------------------------
/src/sbt-test/np/cross-sbt-plugin/build.sbt:
--------------------------------------------------------------------------------
1 | seq(npSettings:_*)
2 |
3 | InputKey[Unit]("contents") <<= inputTask { (argsTask: TaskKey[Seq[String]]) =>
4 | (argsTask, streams) map {
5 | (args, out) =>
6 | args match {
7 | case Seq(given, expected) =>
8 | if(IO.read(file(given)).trim.equals(IO.read(file(expected)).trim)) out.log.debug(
9 | "Contents match"
10 | )
11 | else error(
12 | "Contents of (%s)\n%s does not match (%s)\n%s" format(
13 | given, IO.read(file(given)), expected, IO.read(file(expected))
14 | )
15 | )
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/sbt-test/np/cross-sbt-plugin/fixtures/build.sbt:
--------------------------------------------------------------------------------
1 | sbtPlugin := true
2 |
3 | organization := "com.bar"
4 |
5 | name := "foo"
6 |
7 | version <<= sbtVersion("0.1.0-%s-SNAPSHOT" format _)
8 |
--------------------------------------------------------------------------------
/src/sbt-test/np/cross-sbt-plugin/project/build.properties:
--------------------------------------------------------------------------------
1 | sbt.version=0.13.0-RC4
2 |
--------------------------------------------------------------------------------
/src/sbt-test/np/cross-sbt-plugin/project/plugins.sbt:
--------------------------------------------------------------------------------
1 | addSbtPlugin("me.lessis" % "np" % "latest.integration")
2 |
--------------------------------------------------------------------------------
/src/sbt-test/np/cross-sbt-plugin/test:
--------------------------------------------------------------------------------
1 | # should generate templated cross sbt version
2 | # for plugins
3 | > np name:foo org:com.bar version:0.1.0-{sbtVersion}-SNAPSHOT dir:foo plugin:true
4 | $ exists foo/src/main/scala
5 | $ exists foo/src/main/resources
6 | $ exists foo/src/test/scala
7 | $ exists foo/src/test/resources
8 | > contents fixtures/build.sbt foo/build.sbt
--------------------------------------------------------------------------------
/src/sbt-test/np/custom-defaults/build.sbt:
--------------------------------------------------------------------------------
1 | seq(npSettings:_*)
2 |
3 | (NpKeys.defaults in (Compile, NpKeys.np)) <<= (NpKeys.defaults in (Compile,NpKeys.np))(d =>
4 | d.copy(name = "foo", org = "com.bar",
5 | dir = "foo", version="0.1-TEST")
6 | )
7 |
8 | InputKey[Unit]("contents") <<= inputTask { (argsTask: TaskKey[Seq[String]]) =>
9 | (argsTask, streams) map {
10 | (args, out) =>
11 | args match {
12 | case Seq(given, expected) =>
13 | if(IO.read(file(given)).trim.equals(IO.read(file(expected)).trim)) out.log.debug(
14 | "Contents match"
15 | )
16 | else error(
17 | "Contents of (%s)\n%s does not match (%s)\n%s" format(
18 | given, IO.read(file(given)), expected, IO.read(file(expected))
19 | )
20 | )
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/sbt-test/np/custom-defaults/fixtures/build.sbt:
--------------------------------------------------------------------------------
1 | organization := "com.bar"
2 |
3 | name := "foo"
4 |
5 | version := "0.1-TEST"
6 |
--------------------------------------------------------------------------------
/src/sbt-test/np/custom-defaults/project/build.properties:
--------------------------------------------------------------------------------
1 | sbt.version=0.13.0-RC4
2 |
--------------------------------------------------------------------------------
/src/sbt-test/np/custom-defaults/project/plugins.sbt:
--------------------------------------------------------------------------------
1 | addSbtPlugin("me.lessis" % "np" % "latest.integration")
2 |
--------------------------------------------------------------------------------
/src/sbt-test/np/custom-defaults/test:
--------------------------------------------------------------------------------
1 | # create a project from defaults
2 | > np
3 | $ exists foo/build.sbt
4 | $ exists foo/src/main/scala
5 | $ exists foo/src/main/resources
6 | $ exists foo/src/test/scala
7 | $ exists foo/src/test/resources
8 | > contents fixtures/build.sbt foo/build.sbt
--------------------------------------------------------------------------------
/src/sbt-test/np/simple/build.sbt:
--------------------------------------------------------------------------------
1 | seq(npSettings:_*)
2 |
3 | InputKey[Unit]("contents") <<= inputTask { (argsTask: TaskKey[Seq[String]]) =>
4 | (argsTask, streams) map {
5 | (args, out) =>
6 | args match {
7 | case Seq(given, expected) =>
8 | if(IO.read(file(given)).trim.equals(IO.read(file(expected)).trim)) out.log.debug(
9 | "Contents match"
10 | )
11 | else error(
12 | "Contents of (%s)\n%s does not match (%s)\n%s" format(
13 | given, IO.read(file(given)), expected, IO.read(file(expected))
14 | )
15 | )
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/sbt-test/np/simple/fixtures/build.sbt:
--------------------------------------------------------------------------------
1 | organization := "com.bar"
2 |
3 | name := "foo"
4 |
5 | version := "0.1"
6 |
--------------------------------------------------------------------------------
/src/sbt-test/np/simple/project/build.properties:
--------------------------------------------------------------------------------
1 | sbt.version=0.13.0-RC4
2 |
--------------------------------------------------------------------------------
/src/sbt-test/np/simple/project/plugins.sbt:
--------------------------------------------------------------------------------
1 | addSbtPlugin("me.lessis" % "np" % "latest-integration")
2 |
--------------------------------------------------------------------------------
/src/sbt-test/np/simple/test:
--------------------------------------------------------------------------------
1 | # make a project simple project
2 | > np name:foo org:com.bar version:0.1 dir:foo
3 | $ exists foo/src/main/scala
4 | $ exists foo/src/main/resources
5 | $ exists foo/src/test/scala
6 | $ exists foo/src/test/resources
7 | $ exists foo/build.sbt
8 | > contents fixtures/build.sbt foo/build.sbt
--------------------------------------------------------------------------------