From e6b86afc7e765068441a1d0bb57eead199f55150 Mon Sep 17 00:00:00 2001 From: Alexandra Dima Date: Tue, 16 Jul 2019 21:25:50 +0200 Subject: Adding the scratch folder to git. --- scratch/build.sc | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 scratch/build.sc (limited to 'scratch/build.sc') diff --git a/scratch/build.sc b/scratch/build.sc new file mode 100644 index 00000000..97a7d1b4 --- /dev/null +++ b/scratch/build.sc @@ -0,0 +1,52 @@ +import mill.scalalib.{SbtModule, Dep, DepSyntax} +//import $ivy.`com.lihaoyi::mill-contrib-bsp:0.4.1-21-fd34d3-DIRTY61e11e70` + +trait BetterFilesModule extends SbtModule{ + def scalaVersion = "2.12.4" + def scalacOptions = Seq( + "-deprecation", // Emit warning and location for usages of deprecated APIs. + "-encoding", "utf-8", // Specify character encoding used by source files. + "-explaintypes", // Explain type errors in more detail. + "-feature", // Emit warning and location for usages of features that should be imported explicitly. + "-Ywarn-infer-any", // Warn when a type argument is inferred to be `Any`. + "-Ywarn-nullary-override", // Warn when non-nullary `def f()' overrides nullary `def f'. + "-Ywarn-nullary-unit", // Warn when nullary methods return Unit. + "-Ywarn-numeric-widen", // Warn when numerics are widened. + "-Ywarn-unused:implicits", // Warn if an implicit parameter is unused. + "-Ywarn-unused:imports", // Warn if an import selector is not referenced. + "-Ywarn-unused:locals", // Warn if a local definition is unused. + "-Ywarn-unused:params", // Warn if a value parameter is unused. + "-Ywarn-unused:patvars", // Warn if a variable bound in a pattern is unused. + "-Ywarn-unused:privates", // Warn if a private member is unused. + "-Ywarn-value-discard" // Warn when non-Unit expression results are unused. + ) + override def javacOptions = Seq("-source", "1.8", "-target", "1.8", "-Xlint") + + object test extends Tests{ + def moduleDeps = + if (this == core.test) super.moduleDeps + else super.moduleDeps ++ Seq(core.test) + def ivyDeps = Agg(ivy"org.scalatest::scalatest:3.0.4") + def testFrameworks = Seq("org.scalatest.tools.Framework") + } +} + +object core extends BetterFilesModule + +object bsp extends BetterFilesModule{ + def moduleDeps = Seq(core) + def ivyDeps = Agg(ivy"ch.epfl.scala:bsp4j:2.0.0-M3") +} + +object benchmarks extends BetterFilesModule{ + def moduleDeps = Seq(core) + def ivyDeps = Agg( + ivy"commons-io:commons-io:2.5" + ) + def unmanagedClasspath = Agg( + mill.modules.Util.download( + "https://github.com/williamfiset/FastJavaIO/releases/download/v1.0/fastjavaio.jar", + "fastjavaio.jar" + ) + ) +} \ No newline at end of file -- cgit v1.2.3