diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-11-17 11:51:08 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-11-22 01:35:07 +0100 |
commit | 6acdc1e85f04cc3a240ddb91983588897786d8ca (patch) | |
tree | a86262ad133d0dc3af19919cdc6ff77d1044003a /sbt-bridge/src/sbt-test/source-dependencies/ext | |
parent | c061baf8c4a81f2b1505c30a5240857411981f62 (diff) | |
download | dotty-6acdc1e85f04cc3a240ddb91983588897786d8ca.tar.gz dotty-6acdc1e85f04cc3a240ddb91983588897786d8ca.tar.bz2 dotty-6acdc1e85f04cc3a240ddb91983588897786d8ca.zip |
Move bridge to correct location, fix unmanaged sources in build
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 |