This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git


The following commit(s) were added to refs/heads/main by this push:
     new 54ff1fcf1f Configure `TestJdk9` for Develocity (#1370)
54ff1fcf1f is described below

commit 54ff1fcf1fb1acab7d1ff0eb3dabeb9773dc8814
Author: Martin Duhem <[email protected]>
AuthorDate: Mon Jun 17 18:21:01 2024 +0200

    Configure `TestJdk9` for Develocity (#1370)
    
    Prevously, the tests that are run in the `TestJdk9` configuration were
    not captured by Develocity: the results of these tests would not appear
    in the Develocity test report and dashboard, and failed tests would not
    be retried.
    
    Because TestJdk9 is a custom configuration, Develocity cannot configure
    it automatically and we need to manually add the Develocity test
    settings in that configuration. This is done through an auto plugin that
    is enabled only on projects where both the Develocity and Jdk9 plugins
    are enabled.
---
 project/PekkoDevelocityPlugin.scala | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/project/PekkoDevelocityPlugin.scala 
b/project/PekkoDevelocityPlugin.scala
index 7fea1dd0bf..57497ce225 100644
--- a/project/PekkoDevelocityPlugin.scala
+++ b/project/PekkoDevelocityPlugin.scala
@@ -22,7 +22,7 @@ import 
com.gradle.develocity.agent.sbt.DevelocityPlugin.autoImport.{
   ProjectId,
   Publishing
 }
-import sbt.{ url, AutoPlugin, Def, PluginTrigger, Plugins, Setting }
+import sbt.{ inConfig, url, AutoPlugin, Def, PluginTrigger, Plugins, Setting }
 import sbt.Keys.insideCI
 
 object PekkoDevelocityPlugin extends AutoPlugin {
@@ -63,3 +63,15 @@ object PekkoDevelocityPlugin extends AutoPlugin {
       } else apacheDevelocityConfiguration
     })
 }
+
+/**
+ * An AutoPlugin to add Develocity test configuration to the TestJdk9 
configuration.
+ */
+object PekkoDevelocityJdk9TestSettingsPlugin extends AutoPlugin {
+  override lazy val trigger: PluginTrigger = allRequirements
+  override lazy val requires: Plugins = DevelocityPlugin && Jdk9
+
+  // See 
https://docs.gradle.com/develocity/sbt-plugin/#capturing_test_data_in_a_custom_configuration
+  override lazy val projectSettings =
+    inConfig(Jdk9.TestJdk9)(DevelocityPlugin.testSettings)
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to