From 9ebf809259cfb636ec1729eb25c78d4e7ec41d77 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Tue, 23 Aug 2011 19:51:51 -0400 Subject: [PATCH] test for separate configuration of doc sources --- main/Defaults.scala | 2 +- sbt/src/sbt-test/actions/doc/A.scala | 6 ++++++ sbt/src/sbt-test/actions/doc/B.scala | 6 ++++++ sbt/src/sbt-test/actions/doc/test | 7 +++++++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 sbt/src/sbt-test/actions/doc/A.scala create mode 100644 sbt/src/sbt-test/actions/doc/B.scala create mode 100644 sbt/src/sbt-test/actions/doc/test diff --git a/main/Defaults.scala b/main/Defaults.scala index 115e3f973..6b7b9d495 100644 --- a/main/Defaults.scala +++ b/main/Defaults.scala @@ -187,7 +187,7 @@ object Defaults extends BuildCommon run <<= runTask(fullClasspath, mainClass in run, runner in run), runMain <<= runMainTask(fullClasspath, runner in run), scaladocOptions in GlobalScope :== Nil, - scaladocOptions <<= scaladocOptions or scalacOptions.identity, + scaladocOptions in doc <<= scaladocOptions in doc or scalacOptions.identity, copyResources <<= copyResourcesTask ) diff --git a/sbt/src/sbt-test/actions/doc/A.scala b/sbt/src/sbt-test/actions/doc/A.scala new file mode 100644 index 000000000..325b1e8e2 --- /dev/null +++ b/sbt/src/sbt-test/actions/doc/A.scala @@ -0,0 +1,6 @@ +object A { + /** + * @param i An argument + */ + def x(i: Int) = 3 +} \ No newline at end of file diff --git a/sbt/src/sbt-test/actions/doc/B.scala b/sbt/src/sbt-test/actions/doc/B.scala new file mode 100644 index 000000000..85b15000f --- /dev/null +++ b/sbt/src/sbt-test/actions/doc/B.scala @@ -0,0 +1,6 @@ +object B { + /** + * @notparam i An argument + */ + def x(i: Int) = 3 +} \ No newline at end of file diff --git a/sbt/src/sbt-test/actions/doc/test b/sbt/src/sbt-test/actions/doc/test new file mode 100644 index 000000000..963c6bb65 --- /dev/null +++ b/sbt/src/sbt-test/actions/doc/test @@ -0,0 +1,7 @@ +> 'set scaladocOptions in doc += "-Xfatal-warnings"' + +-> doc + +> 'set sources in (Compile, doc) <<= sources in Compile map { _.filter(_.getName contains "A") }' + +> doc \ No newline at end of file