Skip to content

Commit

Permalink
avoid directly change the path of source files, but fit the project d…
Browse files Browse the repository at this point in the history
…irectory.
  • Loading branch information
Readon committed Dec 7, 2022
1 parent 1ed1599 commit 304f719
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 11 deletions.
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ ThisBuild / organization := "org.example"
val spinalVersion = "1.8.0"
val spinalCore = "com.github.spinalhdl" %% "spinalhdl-core" % spinalVersion
val spinalLib = "com.github.spinalhdl" %% "spinalhdl-lib" % spinalVersion
val spinalTester = "com.github.spinalhdl" %% "spinalhdl-tester" % spinalVersion % Test
val spinalIdslPlugin = compilerPlugin("com.github.spinalhdl" %% "spinalhdl-idsl-plugin" % spinalVersion)

lazy val projectname = (project in file("."))
lazy val projectname = (project in file("hw/spinal"))
.settings(
Compile / scalaSource := baseDirectory.value / "hw" / "spinal",
libraryDependencies ++= Seq(spinalCore, spinalLib, spinalIdslPlugin)
libraryDependencies ++= Seq(spinalCore, spinalLib, spinalTester, spinalIdslPlugin)
)

fork := true
10 changes: 2 additions & 8 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,15 @@ val spinalVersion = "1.8.0"

object projectname extends SbtModule {
def scalaVersion = "2.12.16"
override def millSourcePath = os.pwd
def srcDir = T.sources(
millSourcePath / "hw" / "spinal"
)

def sources = srcDir
override def millSourcePath = os.pwd / "hw" / "spinal"

def ivyDeps = Agg(
ivy"com.github.spinalhdl::spinalhdl-core:$spinalVersion",
ivy"com.github.spinalhdl::spinalhdl-lib:$spinalVersion"
)
def compileIvyDeps = Agg(ivy"com.github.spinalhdl::spinalhdl-tester:$spinalVersion")
def scalacPluginIvyDeps = Agg(ivy"com.github.spinalhdl::spinalhdl-idsl-plugin:$spinalVersion")

object test extends Tests with TestModule.ScalaTest {
def sources = srcDir
def ivyDeps = Agg(ivy"com.github.spinalhdl::spinalhdl-tester:$spinalVersion")
}
}
File renamed without changes.
File renamed without changes.

0 comments on commit 304f719

Please sign in to comment.