From ea9fbf115fb644401490e79de54de7140a3536f6 Mon Sep 17 00:00:00 2001 From: Kory Date: Sun, 17 Sep 2023 12:29:36 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20Chrome=20Profile=20=E3=82=92=20scalac?= =?UTF-8?q?=20=E3=81=AB=E5=87=BA=E3=81=97=E3=81=A6=E3=82=82=E3=82=89?= =?UTF-8?q?=E3=81=86=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ build.sbt | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0d629f7d8b..f24d7932ff 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file diff --git a/build.sbt b/build.sbt index 0c412b2f9a..5c551a4dfb 100644 --- a/build.sbt +++ b/build.sbt @@ -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", @@ -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", @@ -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