@@ -15,9 +15,9 @@ lazy val `Compile-Akka-2.6` = config("akka-2.6")
1515/**
1616 * Test Configurations
1717 */
18- lazy val TestCommon = config(" test-common" ) extend(Common )
19- lazy val `Test-Akka-2.5` = config(" test-akka-2.5" ) extend(`Compile-Akka-2.5`)
20- lazy val `Test-Akka-2.6` = config(" test-akka-2.6" ) extend(`Compile-Akka-2.6`)
18+ lazy val TestCommon = config(" test-common" ) extend (Common )
19+ lazy val `Test-Akka-2.5` = config(" test-akka-2.5" ) extend (`Compile-Akka-2.5`)
20+ lazy val `Test-Akka-2.6` = config(" test-akka-2.6" ) extend (`Compile-Akka-2.6`)
2121
2222configs(
2323 Common ,
@@ -34,91 +34,98 @@ inConfig(Common)(Defaults.compileSettings ++ Seq(
3434 crossScalaVersions := Seq (`scala_2.12_version`, `scala_2.13_version`, scala_3_version)
3535))
3636
37- libraryDependencies ++= { if (scalaBinaryVersion.value == " 2.11" ) Seq .empty else Seq (
38- kanelaAgent % Common ,
39- scalatest % TestCommon ,
40- logbackClassic % TestCommon ,
41- " com.typesafe.akka" %% " akka-actor" % `Akka-2.6-version` % Common ,
42- " com.typesafe.akka" %% " akka-testkit" % `Akka-2.6-version` % Common ,
43- " com.typesafe.akka" %% " akka-slf4j" % `Akka-2.6-version` % Common ,
44- " com.typesafe.akka" %% " akka-remote" % `Akka-2.6-version` % Common ,
45- " com.typesafe.akka" %% " akka-cluster" % `Akka-2.6-version` % Common ,
46- " com.typesafe.akka" %% " akka-cluster-sharding" % `Akka-2.6-version` % Common ,
47- " com.typesafe.akka" %% " akka-protobuf" % `Akka-2.6-version` % Common ,
48- " com.typesafe.akka" %% " akka-testkit" % `Akka-2.6-version` % TestCommon
49- )}
50-
37+ libraryDependencies ++= {
38+ if (scalaBinaryVersion.value == " 2.11" ) Seq .empty
39+ else Seq (
40+ kanelaAgent % Common ,
41+ scalatest % TestCommon ,
42+ logbackClassic % TestCommon ,
43+ " com.typesafe.akka" %% " akka-actor" % `Akka-2.6-version` % Common ,
44+ " com.typesafe.akka" %% " akka-testkit" % `Akka-2.6-version` % Common ,
45+ " com.typesafe.akka" %% " akka-slf4j" % `Akka-2.6-version` % Common ,
46+ " com.typesafe.akka" %% " akka-remote" % `Akka-2.6-version` % Common ,
47+ " com.typesafe.akka" %% " akka-cluster" % `Akka-2.6-version` % Common ,
48+ " com.typesafe.akka" %% " akka-cluster-sharding" % `Akka-2.6-version` % Common ,
49+ " com.typesafe.akka" %% " akka-protobuf" % `Akka-2.6-version` % Common ,
50+ " com.typesafe.akka" %% " akka-testkit" % `Akka-2.6-version` % TestCommon
51+ )
52+ }
5153
5254inConfig(`Compile-Akka-2.6`)(Defaults .compileSettings ++ Seq (
5355 crossScalaVersions := Seq (`scala_2.12_version`, `scala_2.13_version`, scala_3_version),
5456 sources := joinSources(Common , `Compile-Akka-2.6`).value
5557))
5658
57- libraryDependencies ++= { if (scalaBinaryVersion.value == " 2.11" ) Seq .empty else Seq (
58- kanelaAgent % `Compile-Akka-2.6`,
59- scalatest % `Test-Akka-2.6`,
60- logbackClassic % `Test-Akka-2.6`,
61- " com.typesafe.akka" %% " akka-actor" % `Akka-2.6-version` % `Compile-Akka-2.6`,
62- " com.typesafe.akka" %% " akka-testkit" % `Akka-2.6-version` % `Compile-Akka-2.6`,
63- " com.typesafe.akka" %% " akka-slf4j" % `Akka-2.6-version` % `Compile-Akka-2.6`,
64- " com.typesafe.akka" %% " akka-remote" % `Akka-2.6-version` % `Compile-Akka-2.6`,
65- " com.typesafe.akka" %% " akka-cluster" % `Akka-2.6-version` % `Compile-Akka-2.6`,
66- " com.typesafe.akka" %% " akka-cluster-sharding" % `Akka-2.6-version` % `Compile-Akka-2.6`,
67- " com.typesafe.akka" %% " akka-protobuf" % `Akka-2.6-version` % `Compile-Akka-2.6`,
68- " com.typesafe.akka" %% " akka-testkit" % `Akka-2.6-version` % `Test-Akka-2.6`
69- )}
70-
59+ libraryDependencies ++= {
60+ if (scalaBinaryVersion.value == " 2.11" ) Seq .empty
61+ else Seq (
62+ kanelaAgent % `Compile-Akka-2.6`,
63+ scalatest % `Test-Akka-2.6`,
64+ logbackClassic % `Test-Akka-2.6`,
65+ " com.typesafe.akka" %% " akka-actor" % `Akka-2.6-version` % `Compile-Akka-2.6`,
66+ " com.typesafe.akka" %% " akka-testkit" % `Akka-2.6-version` % `Compile-Akka-2.6`,
67+ " com.typesafe.akka" %% " akka-slf4j" % `Akka-2.6-version` % `Compile-Akka-2.6`,
68+ " com.typesafe.akka" %% " akka-remote" % `Akka-2.6-version` % `Compile-Akka-2.6`,
69+ " com.typesafe.akka" %% " akka-cluster" % `Akka-2.6-version` % `Compile-Akka-2.6`,
70+ " com.typesafe.akka" %% " akka-cluster-sharding" % `Akka-2.6-version` % `Compile-Akka-2.6`,
71+ " com.typesafe.akka" %% " akka-protobuf" % `Akka-2.6-version` % `Compile-Akka-2.6`,
72+ " com.typesafe.akka" %% " akka-testkit" % `Akka-2.6-version` % `Test-Akka-2.6`
73+ )
74+ }
7175
7276inConfig(`Compile-Akka-2.5`)(Defaults .compileSettings ++ Seq (
7377 sources := joinSources(Common , `Compile-Akka-2.5`).value
7478))
7579
76- libraryDependencies ++= {if (scalaVersion.value startsWith " 3" ) Seq .empty else Seq (
77- kanelaAgent % `Compile-Akka-2.5`,
78- scalatest % `Test-Akka-2.5`,
79- logbackClassic % `Test-Akka-2.5`,
80- " com.typesafe.akka" %% " akka-actor" % `Akka-2.5-version` % `Compile-Akka-2.5`,
81- " com.typesafe.akka" %% " akka-testkit" % `Akka-2.5-version` % `Compile-Akka-2.5`,
82- " com.typesafe.akka" %% " akka-slf4j" % `Akka-2.5-version` % `Compile-Akka-2.5`,
83- " com.typesafe.akka" %% " akka-remote" % `Akka-2.5-version` % `Compile-Akka-2.5`,
84- " com.typesafe.akka" %% " akka-cluster" % `Akka-2.5-version` % `Compile-Akka-2.5`,
85- " com.typesafe.akka" %% " akka-cluster-sharding" % `Akka-2.5-version` % `Compile-Akka-2.5`,
86- " com.typesafe.akka" %% " akka-protobuf" % `Akka-2.5-version` % `Compile-Akka-2.5`,
87- " com.typesafe.akka" %% " akka-testkit" % `Akka-2.5-version` % `Test-Akka-2.5`
88- )}
80+ libraryDependencies ++= {
81+ if (scalaVersion.value startsWith " 3" ) Seq .empty
82+ else Seq (
83+ kanelaAgent % `Compile-Akka-2.5`,
84+ scalatest % `Test-Akka-2.5`,
85+ logbackClassic % `Test-Akka-2.5`,
86+ " com.typesafe.akka" %% " akka-actor" % `Akka-2.5-version` % `Compile-Akka-2.5`,
87+ " com.typesafe.akka" %% " akka-testkit" % `Akka-2.5-version` % `Compile-Akka-2.5`,
88+ " com.typesafe.akka" %% " akka-slf4j" % `Akka-2.5-version` % `Compile-Akka-2.5`,
89+ " com.typesafe.akka" %% " akka-remote" % `Akka-2.5-version` % `Compile-Akka-2.5`,
90+ " com.typesafe.akka" %% " akka-cluster" % `Akka-2.5-version` % `Compile-Akka-2.5`,
91+ " com.typesafe.akka" %% " akka-cluster-sharding" % `Akka-2.5-version` % `Compile-Akka-2.5`,
92+ " com.typesafe.akka" %% " akka-protobuf" % `Akka-2.5-version` % `Compile-Akka-2.5`,
93+ " com.typesafe.akka" %% " akka-testkit" % `Akka-2.5-version` % `Test-Akka-2.5`
94+ )
95+ }
8996
9097// Ensure that the packaged artifact contains the instrumentation for all Akka versions.
9198Compile / packageBin / mappings := Def .taskDyn {
92- if (scalaBinaryVersion.value == " 2.11" ) {
99+ if (scalaBinaryVersion.value == " 2.11" ) {
93100 Def .task {
94101 joinProducts((`Compile-Akka-2.5` / products).value) ++
95102 joinProducts((Common / unmanagedResourceDirectories).value)
96103 }
97104 } else if (scalaVersion.value startsWith " 3" ) {
98105 Def .task {
99- joinProducts((`Compile-Akka-2.6` / products).value) ++
106+ joinProducts((`Compile-Akka-2.6` / products).value) ++
100107 joinProducts((Common / unmanagedResourceDirectories).value)
101108 }
102109 } else {
103110 Def .task {
104111 joinProducts(
105112 (`Compile-Akka-2.5` / products).value ++
106113 (`Compile-Akka-2.6` / products).value
107- ) ++ joinProducts((Common / unmanagedResourceDirectories).value)
114+ ) ++ joinProducts((Common / unmanagedResourceDirectories).value)
108115 }
109116 }
110117}.value
111118
112119// Ensure that the packaged sources contains the instrumentation for all Akka versions.
113120Compile / packageSrc / mappings := Def .taskDyn {
114- if (scalaBinaryVersion.value == " 2.11" ) {
121+ if (scalaBinaryVersion.value == " 2.11" ) {
115122 Def .task {
116123 (`Compile-Akka-2.5` / packageSrc / mappings).value ++
117124 (Common / packageSrc / mappings).value
118- }
125+ }
119126 } else if (scalaVersion.value startsWith " 3" ) {
120127 Def .task {
121- (`Compile-Akka-2.6` / packageSrc / mappings).value ++
128+ (`Compile-Akka-2.6` / packageSrc / mappings).value ++
122129 (Common / packageSrc / mappings).value
123130 }
124131 } else {
@@ -128,19 +135,19 @@ Compile / packageSrc / mappings := Def.taskDyn {
128135 (Common / packageSrc / mappings).value
129136 }
130137 }
131- }.value
138+ }.value
132139
133140// Compile will return the compile analysis for the Common configuration but will run on all Akka configurations.
134141Compile / compile := Def .taskDyn {
135- if (scalaBinaryVersion.value == " 2.11" ) {
142+ if (scalaBinaryVersion.value == " 2.11" ) {
136143 Def .task {
137144 (`Compile-Akka-2.5` / compile).value
138145 }
139- } else if (scalaVersion.value startsWith " 3" ){
146+ } else if (scalaVersion.value startsWith " 3" ) {
140147
141148 Def .task {
142149 (`Compile-Akka-2.6` / compile).value
143- }
150+ }
144151 } else {
145152 Def .task {
146153 (`Compile-Akka-2.5` / compile).value
@@ -151,7 +158,6 @@ Compile / compile := Def.taskDyn {
151158
152159exportJars := true
153160
154-
155161/**
156162 * Test-related settings
157163 */
@@ -181,19 +187,18 @@ inConfig(`Test-Akka-2.6`)(Defaults.testSettings ++ instrumentationSettings ++ ba
181187))
182188
183189Test / test := Def .taskDyn {
184- if (scalaBinaryVersion.value == " 2.11" ) {
190+ if (scalaBinaryVersion.value == " 2.11" ) {
185191 Def .task {
186192 (`Test-Akka-2.5` / test).value
187193 }
188194 } else if (scalaVersion.value startsWith " 3" ) {
189195 Def .task {
190196 (`Test-Akka-2.6` / test).value
191197 }
192- }
193- else {
198+ } else {
194199 Def .task {
195200 (`Test-Akka-2.5` / test).value
196201 (`Test-Akka-2.6` / test).value
197202 }
198203 }
199- }.value
204+ }.value
0 commit comments