summaryrefslogtreecommitdiff
path: root/scratch/build.sc
diff options
context:
space:
mode:
authorAlexandra Dima <alexandra.dima@jetbrains.com>2019-07-16 21:25:50 +0200
committerSamvel Abrahamyan <samvel1024@gmail.com>2019-10-12 14:33:03 +0200
commite6b86afc7e765068441a1d0bb57eead199f55150 (patch)
treec5fc039837bdfe80c0f31e735bf72a5f7a61a1a5 /scratch/build.sc
parentd7473780f2ab9ae7c5a3b77e482fd849438f631e (diff)
downloadmill-e6b86afc7e765068441a1d0bb57eead199f55150.tar.gz
mill-e6b86afc7e765068441a1d0bb57eead199f55150.tar.bz2
mill-e6b86afc7e765068441a1d0bb57eead199f55150.zip
Adding the scratch folder to git.
Diffstat (limited to 'scratch/build.sc')
-rw-r--r--scratch/build.sc52
1 files changed, 52 insertions, 0 deletions
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