diff options
Diffstat (limited to 'sbt-bridge/src/sbt-test/source-dependencies/ext')
4 files changed, 38 insertions, 0 deletions
diff --git a/sbt-bridge/src/sbt-test/source-dependencies/ext/A.scala b/sbt-bridge/src/sbt-test/source-dependencies/ext/A.scala new file mode 100644 index 000000000..ad9931075 --- /dev/null +++ b/sbt-bridge/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-bridge/src/sbt-test/source-dependencies/ext/build.sbt b/sbt-bridge/src/sbt-test/source-dependencies/ext/build.sbt new file mode 100644 index 000000000..8aaec76ec --- /dev/null +++ b/sbt-bridge/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-bridge/src/sbt-test/source-dependencies/ext/project/DottyInjectedPlugin.scala b/sbt-bridge/src/sbt-test/source-dependencies/ext/project/DottyInjectedPlugin.scala new file mode 100644 index 000000000..3433779b6 --- /dev/null +++ b/sbt-bridge/src/sbt-test/source-dependencies/ext/project/DottyInjectedPlugin.scala @@ -0,0 +1,17 @@ +import sbt._ +import Keys._ + +object DottyInjectedPlugin extends AutoPlugin { + override def requires = plugins.JvmPlugin + override def trigger = allRequirements + + override val projectSettings = Seq( + scalaVersion := "0.1-SNAPSHOT", + scalaOrganization := "ch.epfl.lamp", + scalacOptions += "-language:Scala2", + scalaBinaryVersion := "2.11", + autoScalaLibrary := false, + libraryDependencies ++= Seq("org.scala-lang" % "scala-library" % "2.11.5"), + scalaCompilerBridgeSource := ("ch.epfl.lamp" % "dotty-bridge" % "0.1.1-SNAPSHOT" % "component").sources() + ) +} diff --git a/sbt-bridge/src/sbt-test/source-dependencies/ext/test b/sbt-bridge/src/sbt-test/source-dependencies/ext/test new file mode 100644 index 000000000..2b01a3de7 --- /dev/null +++ b/sbt-bridge/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 <java.home>lib/ext/ would +# always force recompilation +> checkIterations 1
\ No newline at end of file |