Skip to content

Commit

Permalink
chore: Chrome Profile を scalac に出してもらうようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
kory33 authored and rito528 committed Oct 22, 2023
1 parent b093afe commit 3860b98
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ docker/spigot/serverfiles/eula.txt
.metals
project/.bloop/
project/metals.sbt

# scalac に -Yprofile-trace profile.trace を渡しているので、Chrome Trace file が生成される
/profile.trace
14 changes: 12 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ val providedDependencies = Seq(
).map(_ % "provided")

val scalafixCoreDep =
"ch.epfl.scala" %% "scalafix-core" % _root_.scalafix.sbt.BuildInfo.scalafixVersion % ScalafixConfig
"ch.epfl.scala" %% "scalafix-core" % _root_
.scalafix
.sbt
.BuildInfo
.scalafixVersion % ScalafixConfig

val testDependencies = Seq(
"org.scalamock" %% "scalamock" % "5.2.0",
Expand Down Expand Up @@ -198,6 +202,8 @@ lazy val root = (project in file(".")).settings(
excludeDependencies := Seq(ExclusionRule(organization = "org.bukkit", name = "bukkit")),
unmanagedBase := baseDirectory.value / "localDependencies",
scalacOptions ++= Seq(
"-Yprofile-trace",
"profile.trace",
"-encoding",
"utf8",
"-unchecked",
Expand All @@ -210,7 +216,11 @@ lazy val root = (project in file(".")).settings(
),
javacOptions ++= Seq("-encoding", "utf8"),
assembly / assemblyShadeRules ++= Seq(
ShadeRule.rename("org.mariadb.jdbc.**" -> "com.github.unchama.seichiassist.relocateddependencies.org.mariadb.jdbc.@1").inAll
ShadeRule
.rename(
"org.mariadb.jdbc.**" -> "com.github.unchama.seichiassist.relocateddependencies.org.mariadb.jdbc.@1"
)
.inAll
),
// sbt-assembly 1.0.0からはTestを明示的にタスクツリーに入れる必要がある
// cf. https://github.com/sbt/sbt-assembly/pull/432/commits/361224a6202856bc2e572df811d0e6a1f1efda98
Expand Down

0 comments on commit 3860b98

Please sign in to comment.