diff --git a/sbt/src/sbt-test/source-dependencies/ext/A.scala b/sbt/src/sbt-test/source-dependencies/ext/A.scala new file mode 100644 index 000000000..ad9931075 --- /dev/null +++ b/sbt/src/sbt-test/source-dependencies/ext/A.scala @@ -0,0 +1,5 @@ +import sun.net.spi.nameservice.dns.DNSNameService + +object A { + val x = new DNSNameService +} \ No newline at end of file diff --git a/sbt/src/sbt-test/source-dependencies/ext/build.sbt b/sbt/src/sbt-test/source-dependencies/ext/build.sbt new file mode 100644 index 000000000..8aaec76ec --- /dev/null +++ b/sbt/src/sbt-test/source-dependencies/ext/build.sbt @@ -0,0 +1,9 @@ +import complete.DefaultParsers._ + +val checkIterations = inputKey[Unit]("Verifies the accumlated number of iterations of incremental compilation.") + +checkIterations := { + val expected: Int = (Space ~> NatBasic).parsed + val actual: Int = (compile in Compile).value.compilations.allCompilations.size + assert(expected == actual, s"Expected $expected compilations, got $actual") +} \ No newline at end of file diff --git a/sbt/src/sbt-test/source-dependencies/ext/test b/sbt/src/sbt-test/source-dependencies/ext/test new file mode 100644 index 000000000..2b01a3de7 --- /dev/null +++ b/sbt/src/sbt-test/source-dependencies/ext/test @@ -0,0 +1,7 @@ +# initial compilation +> checkIterations 1 + +# no further compilation should be necessary, since nothing changed +# previously, a dependency on a jar in lib/ext/ would +# always force recompilation +> checkIterations 1 \ No newline at end of file