@@ -15,9 +15,9 @@ lazy val `Compile-Akka-2.6` = config("akka-2.6")
15
15
/**
16
16
* Test Configurations
17
17
*/
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`)
21
21
22
22
configs(
23
23
Common ,
@@ -34,91 +34,98 @@ inConfig(Common)(Defaults.compileSettings ++ Seq(
34
34
crossScalaVersions := Seq (`scala_2.12_version`, `scala_2.13_version`, scala_3_version)
35
35
))
36
36
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
+ }
51
53
52
54
inConfig(`Compile-Akka-2.6`)(Defaults .compileSettings ++ Seq (
53
55
crossScalaVersions := Seq (`scala_2.12_version`, `scala_2.13_version`, scala_3_version),
54
56
sources := joinSources(Common , `Compile-Akka-2.6`).value
55
57
))
56
58
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
+ }
71
75
72
76
inConfig(`Compile-Akka-2.5`)(Defaults .compileSettings ++ Seq (
73
77
sources := joinSources(Common , `Compile-Akka-2.5`).value
74
78
))
75
79
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
+ }
89
96
90
97
// Ensure that the packaged artifact contains the instrumentation for all Akka versions.
91
98
Compile / packageBin / mappings := Def .taskDyn {
92
- if (scalaBinaryVersion.value == " 2.11" ) {
99
+ if (scalaBinaryVersion.value == " 2.11" ) {
93
100
Def .task {
94
101
joinProducts((`Compile-Akka-2.5` / products).value) ++
95
102
joinProducts((Common / unmanagedResourceDirectories).value)
96
103
}
97
104
} else if (scalaVersion.value startsWith " 3" ) {
98
105
Def .task {
99
- joinProducts((`Compile-Akka-2.6` / products).value) ++
106
+ joinProducts((`Compile-Akka-2.6` / products).value) ++
100
107
joinProducts((Common / unmanagedResourceDirectories).value)
101
108
}
102
109
} else {
103
110
Def .task {
104
111
joinProducts(
105
112
(`Compile-Akka-2.5` / products).value ++
106
113
(`Compile-Akka-2.6` / products).value
107
- ) ++ joinProducts((Common / unmanagedResourceDirectories).value)
114
+ ) ++ joinProducts((Common / unmanagedResourceDirectories).value)
108
115
}
109
116
}
110
117
}.value
111
118
112
119
// Ensure that the packaged sources contains the instrumentation for all Akka versions.
113
120
Compile / packageSrc / mappings := Def .taskDyn {
114
- if (scalaBinaryVersion.value == " 2.11" ) {
121
+ if (scalaBinaryVersion.value == " 2.11" ) {
115
122
Def .task {
116
123
(`Compile-Akka-2.5` / packageSrc / mappings).value ++
117
124
(Common / packageSrc / mappings).value
118
- }
125
+ }
119
126
} else if (scalaVersion.value startsWith " 3" ) {
120
127
Def .task {
121
- (`Compile-Akka-2.6` / packageSrc / mappings).value ++
128
+ (`Compile-Akka-2.6` / packageSrc / mappings).value ++
122
129
(Common / packageSrc / mappings).value
123
130
}
124
131
} else {
@@ -128,19 +135,19 @@ Compile / packageSrc / mappings := Def.taskDyn {
128
135
(Common / packageSrc / mappings).value
129
136
}
130
137
}
131
- }.value
138
+ }.value
132
139
133
140
// Compile will return the compile analysis for the Common configuration but will run on all Akka configurations.
134
141
Compile / compile := Def .taskDyn {
135
- if (scalaBinaryVersion.value == " 2.11" ) {
142
+ if (scalaBinaryVersion.value == " 2.11" ) {
136
143
Def .task {
137
144
(`Compile-Akka-2.5` / compile).value
138
145
}
139
- } else if (scalaVersion.value startsWith " 3" ){
146
+ } else if (scalaVersion.value startsWith " 3" ) {
140
147
141
148
Def .task {
142
149
(`Compile-Akka-2.6` / compile).value
143
- }
150
+ }
144
151
} else {
145
152
Def .task {
146
153
(`Compile-Akka-2.5` / compile).value
@@ -151,7 +158,6 @@ Compile / compile := Def.taskDyn {
151
158
152
159
exportJars := true
153
160
154
-
155
161
/**
156
162
* Test-related settings
157
163
*/
@@ -181,19 +187,18 @@ inConfig(`Test-Akka-2.6`)(Defaults.testSettings ++ instrumentationSettings ++ ba
181
187
))
182
188
183
189
Test / test := Def .taskDyn {
184
- if (scalaBinaryVersion.value == " 2.11" ) {
190
+ if (scalaBinaryVersion.value == " 2.11" ) {
185
191
Def .task {
186
192
(`Test-Akka-2.5` / test).value
187
193
}
188
194
} else if (scalaVersion.value startsWith " 3" ) {
189
195
Def .task {
190
196
(`Test-Akka-2.6` / test).value
191
197
}
192
- }
193
- else {
198
+ } else {
194
199
Def .task {
195
200
(`Test-Akka-2.5` / test).value
196
201
(`Test-Akka-2.6` / test).value
197
202
}
198
203
}
199
- }.value
204
+ }.value
0 commit comments