JFR-based remoting flight recorder #26282

This commit is contained in:
Johan Andrén 2019-12-16 11:45:13 +01:00 committed by GitHub
parent 02db62bd73
commit 8a019f86a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 920 additions and 256 deletions

View file

@ -12,7 +12,7 @@ object Jdk9 extends AutoPlugin {
val CompileJdk9 = config("CompileJdk9").extend(Compile)
val TestJdk9 = config("TestJdk9").extend(Test)
val TestJdk9 = config("TestJdk9").extend(Test).extend(CompileJdk9)
val SCALA_SOURCE_DIRECTORY = "scala-jdk-9"
val SCALA_TEST_SOURCE_DIRECTORY = "scala-jdk9-only"
@ -22,25 +22,23 @@ object Jdk9 extends AutoPlugin {
val compileJdk9Settings = Seq(
// following the scala-2.12, scala-sbt-1.0, ... convention
unmanagedSourceDirectories := notOnJdk8(
Seq(
(Compile / sourceDirectory).value / SCALA_SOURCE_DIRECTORY,
(Compile / sourceDirectory).value / JAVA_SOURCE_DIRECTORY)),
Seq(
(Compile / sourceDirectory).value / SCALA_SOURCE_DIRECTORY,
(Compile / sourceDirectory).value / JAVA_SOURCE_DIRECTORY)),
scalacOptions := AkkaBuild.DefaultScalacOptions ++ notOnJdk8(Seq("-release", "11")),
javacOptions := AkkaBuild.DefaultJavacOptions ++ notOnJdk8(Seq("--release", "11")))
val testJdk9Settings = Seq(
// following the scala-2.12, scala-sbt-1.0, ... convention
unmanagedSourceDirectories := notOnJdk8(
Seq(
(Test / sourceDirectory).value / SCALA_TEST_SOURCE_DIRECTORY,
(Test / sourceDirectory).value / JAVA_TEST_SOURCE_DIRECTORY)),
Seq(
(Test / sourceDirectory).value / SCALA_TEST_SOURCE_DIRECTORY,
(Test / sourceDirectory).value / JAVA_TEST_SOURCE_DIRECTORY)),
scalacOptions := AkkaBuild.DefaultScalacOptions ++ notOnJdk8(Seq("-release", "11")),
javacOptions := AkkaBuild.DefaultJavacOptions ++ notOnJdk8(Seq("--release", "11")),
compile := compile.dependsOn(CompileJdk9 / compile).value,
classpathConfiguration := TestJdk9,
externalDependencyClasspath := (externalDependencyClasspath in Test).value
)
externalDependencyClasspath := (externalDependencyClasspath in Test).value)
val compileSettings = Seq(
// It might have been more 'neat' to add the jdk9 products to the jar via packageBin/mappings, but that doesn't work with the OSGi plugin,
@ -49,6 +47,11 @@ object Jdk9 extends AutoPlugin {
// ++= (CompileJdk9 / products).value.flatMap(Path.allSubpaths),
Compile / fullClasspath ++= (CompileJdk9 / exportedProducts).value)
val testSettings = Seq((Test / test) := {
(Test / test).value
(TestJdk9 / test).value
})
override def trigger = noTrigger
override def projectConfigurations = Seq(CompileJdk9)
override lazy val projectSettings =
@ -56,5 +59,6 @@ object Jdk9 extends AutoPlugin {
inConfig(CompileJdk9)(compileJdk9Settings) ++
compileSettings ++
inConfig(TestJdk9)(Defaults.testSettings) ++
inConfig(TestJdk9)(testJdk9Settings)
inConfig(TestJdk9)(testJdk9Settings) ++
testSettings
}