diff options
Diffstat (limited to 'bridge/src/sbt-test/source-dependencies/java-mixed')
7 files changed, 43 insertions, 0 deletions
diff --git a/bridge/src/sbt-test/source-dependencies/java-mixed/JJ.java b/bridge/src/sbt-test/source-dependencies/java-mixed/JJ.java new file mode 100644 index 000000000..18d52ae30 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/java-mixed/JJ.java @@ -0,0 +1,5 @@ +public class JJ { + public static void main(String[] args) { + new S().foo("ahoy"); + } +} diff --git a/bridge/src/sbt-test/source-dependencies/java-mixed/build.sbt b/bridge/src/sbt-test/source-dependencies/java-mixed/build.sbt new file mode 100644 index 000000000..522224a38 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/java-mixed/build.sbt @@ -0,0 +1 @@ +compileOrder := CompileOrder.Mixed
\ No newline at end of file diff --git a/bridge/src/sbt-test/source-dependencies/java-mixed/changes/S1.scala b/bridge/src/sbt-test/source-dependencies/java-mixed/changes/S1.scala new file mode 100644 index 000000000..486f40262 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/java-mixed/changes/S1.scala @@ -0,0 +1,3 @@ +class S { + def foo(s:String): Unit = println("I am foo") +} diff --git a/bridge/src/sbt-test/source-dependencies/java-mixed/changes/S2.scala b/bridge/src/sbt-test/source-dependencies/java-mixed/changes/S2.scala new file mode 100644 index 000000000..63bc37d77 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/java-mixed/changes/S2.scala @@ -0,0 +1,3 @@ +class S { + def foo2(s:String): Unit = println("I am foo") +} diff --git a/bridge/src/sbt-test/source-dependencies/java-mixed/changes/build.sbt b/bridge/src/sbt-test/source-dependencies/java-mixed/changes/build.sbt new file mode 100644 index 000000000..f4f9b5bf7 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/java-mixed/changes/build.sbt @@ -0,0 +1 @@ +compileOrder := CompileOrder.ScalaThenJava
\ No newline at end of file diff --git a/bridge/src/sbt-test/source-dependencies/java-mixed/project/DottyInjectedPlugin.scala b/bridge/src/sbt-test/source-dependencies/java-mixed/project/DottyInjectedPlugin.scala new file mode 100644 index 000000000..3433779b6 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/java-mixed/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/bridge/src/sbt-test/source-dependencies/java-mixed/test b/bridge/src/sbt-test/source-dependencies/java-mixed/test new file mode 100644 index 000000000..60402f1e6 --- /dev/null +++ b/bridge/src/sbt-test/source-dependencies/java-mixed/test @@ -0,0 +1,13 @@ +$ copy-file changes/S1.scala S.scala +> compile +$ copy-file changes/S2.scala S.scala +-> compile + +> clean +$ copy-file changes/build.sbt build.sbt +> reload + +$ copy-file changes/S1.scala S.scala +> compile +$ copy-file changes/S2.scala S.scala +-> compile |