aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Christopher Vogt <oss.nsp@cvogt.org>2016-10-04 09:14:39 -0400
committerGitHub <noreply@github.com>2016-10-04 09:14:39 -0400
commit88bfbeebfbe6a92dfcf26393e0f36f1fefc3d322 (patch)
treed6eea6bd1601b7615b8dae25f1c332a149a2c28c
parent5919c4b6d72ae08d611938422d89190fb5551341 (diff)
parent23399ca0477eec70857fbc78168eb9f2b3563a76 (diff)
downloadcbt-88bfbeebfbe6a92dfcf26393e0f36f1fefc3d322.tar.gz
cbt-88bfbeebfbe6a92dfcf26393e0f36f1fefc3d322.tar.bz2
cbt-88bfbeebfbe6a92dfcf26393e0f36f1fefc3d322.zip
Merge pull request #261 from cvogt/simple-example
Simple example
-rw-r--r--examples/simple-example/build/build.scala20
-rw-r--r--examples/simple-example/build/build/build.scala20
-rw-r--r--examples/simple-example/src/Main.scala3
-rw-r--r--plugins/readme.txt5
-rw-r--r--stage2/plugins/readme.txt4
5 files changed, 52 insertions, 0 deletions
diff --git a/examples/simple-example/build/build.scala b/examples/simple-example/build/build.scala
new file mode 100644
index 0000000..9320990
--- /dev/null
+++ b/examples/simple-example/build/build.scala
@@ -0,0 +1,20 @@
+import cbt._
+class Build(val context: Context) extends BaseBuild{
+ /*
+ override def dependencies =
+ super.dependencies ++ // don't forget super.dependencies here
+ Seq(
+ // source dependency
+ DirectoryDependency( projectDirectory ++ "/subProject" )
+ ) ++
+ Resolver( mavenCentral ).bind(
+ // CBT-style Scala dependencies
+ ScalaDependency( "com.lihaoyi", "ammonite-ops", "0.5.5" )
+ MavenDependency( "com.lihaoyi", "ammonite-ops_2.11", "0.5.5" )
+
+ // SBT-style dependencies
+ "com.lihaoyi" %% "ammonite-ops" % "0.5.5"
+ "com.lihaoyi" % "ammonite-ops_2.11" % "0.5.5"
+ )
+ */
+}
diff --git a/examples/simple-example/build/build/build.scala b/examples/simple-example/build/build/build.scala
new file mode 100644
index 0000000..f700060
--- /dev/null
+++ b/examples/simple-example/build/build/build.scala
@@ -0,0 +1,20 @@
+import cbt._
+class Build(val context: Context) extends BuildBuild{
+ /*
+ override def dependencies =
+ super.dependencies ++ // don't forget super.dependencies here
+ Seq(
+ // source dependency
+ DirectoryDependency( projectDirectory ++ "/subProject" )
+ ) ++
+ Resolver( mavenCentral ).bind(
+ // CBT-style Scala dependencies
+ ScalaDependency( "com.lihaoyi", "ammonite-ops", "0.5.5" )
+ MavenDependency( "com.lihaoyi", "ammonite-ops_2.11", "0.5.5" )
+
+ // SBT-style dependencies
+ "com.lihaoyi" %% "ammonite-ops" % "0.5.5"
+ "com.lihaoyi" % "ammonite-ops_2.11" % "0.5.5"
+ )
+ */
+}
diff --git a/examples/simple-example/src/Main.scala b/examples/simple-example/src/Main.scala
new file mode 100644
index 0000000..88a18d3
--- /dev/null
+++ b/examples/simple-example/src/Main.scala
@@ -0,0 +1,3 @@
+object Main extends App {
+ println("Hello World")
+}
diff --git a/plugins/readme.txt b/plugins/readme.txt
new file mode 100644
index 0000000..c3f561f
--- /dev/null
+++ b/plugins/readme.txt
@@ -0,0 +1,5 @@
+This directory is for plugins plugins which are shipped with CBT,
+but need to be explicitly dependended upon in the BuildBuild.
+This is nice for plugins, which themselves have dependencies
+that we do not want CBT to depend on.
+See stage2/plugins/ for built-in plugins, that have no dependencies.
diff --git a/stage2/plugins/readme.txt b/stage2/plugins/readme.txt
new file mode 100644
index 0000000..d959c72
--- /dev/null
+++ b/stage2/plugins/readme.txt
@@ -0,0 +1,4 @@
+This directory is for built-in plugins which are always available.
+This is nice for plugins, which themselves do not have any
+compile-time dependencies except for CBT itself.
+See <cbt home>/plugins/ for plugins, that require an explicit dependency in the BuildBuild.