Skip to content

Commit

Permalink
Update build.sc to current mill version
Browse files Browse the repository at this point in the history
  • Loading branch information
colin4124 committed Feb 24, 2022
1 parent e62968d commit 9b98684
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions scratchip/assets/build.sc
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
import mill._, scalalib._
import ammonite.ops._
import java.nio.file.Paths

object chisel extends ScalaModule {
def scalaVersion = "2.12.6"
def scalaVersion = "2.13.8"
def scalacOptions = Seq(
"-Xsource:2.11",
"-language:reflectiveCalls",
"-deprecation",
"-feature",
"-Xcheckinit",
"-P:chiselplugin:genBundleElements"
)

def millSourcePath = super.millSourcePath / os.up

override def ivyDeps = Agg(
ivy"edu.berkeley.cs::chisel3:3.5.1",
)

override def scalacPluginIvyDeps = Agg(
ivy"edu.berkeley.cs:::chisel3-plugin:3.5.1",
)
def millSourcePath = super.millSourcePath / ammonite.ops.up

def unmanagedClasspath = T {
val lib_path = T.ctx.env.get("MILL_LIB") match {
case Some(lib) => Path(Paths.get(lib).toAbsolutePath)
case Some(lib) => os.Path(Paths.get(lib).toAbsolutePath)
case None => millSourcePath / "lib"
}
if (!ammonite.ops.exists(lib_path)) Agg()
else Agg.from(ammonite.ops.ls(lib_path).map(PathRef(_)))
if (!os.exists(lib_path)) Agg()
else Agg.from(os.list(lib_path).map(PathRef(_)))
}
}
}

0 comments on commit 9b98684

Please sign in to comment.