@@ -182,31 +182,6 @@ configure(subprojects.findAll { !sourceless.contains(it.name) }) {
182
182
// Remove null assertions to get smaller bytecode on Android
183
183
kotlinOptions. freeCompilerArgs + = [" -Xno-param-assertions" , " -Xno-receiver-assertions" , " -Xno-call-assertions" ]
184
184
}
185
-
186
- dependencies {
187
- components {
188
- it. withModule(" org.jetbrains.kotlin:atomicfu" ) {
189
- def componentMetadataDetails = it as ComponentMetadataDetails
190
- componentMetadataDetails. withVariant(" runtimeElements" ) {
191
- def runtimeElementsVariant = it as VariantMetadata
192
- componentMetadataDetails. addVariant(" runtimeJsIrElements" ) {
193
- def runtimeJsIrElementsVariant = it
194
- runtimeElementsVariant. attributes. attribute(KotlinPlatformType . attribute, KotlinPlatformType . js)
195
- runtimeElementsVariant. attributes. attribute(KotlinJsCompilerAttribute . jsCompilerAttribute, KotlinJsCompilerAttribute . ir)
196
- runtimeElementsVariant. attributes. attribute(Usage . USAGE_ATTRIBUTE , project. objects. named(Usage , Usage . JAVA_RUNTIME ))
197
- runtimeElementsVariant. withFiles {
198
- def runtimeElementsFiles = it as DefaultMutableVariantFilesMetadata
199
- runtimeJsIrElementsVariant. withFiles {
200
- runtimeElementsFiles. files. forEach {
201
- addFile(it. name)
202
- }
203
- }
204
- }
205
- }
206
- }
207
- }
208
- }
209
- }
210
185
}
211
186
212
187
if (build_snapshot_train) {
@@ -381,4 +356,29 @@ allprojects { subProject ->
381
356
" triggering all sort of incompatible class changes errors" )
382
357
}
383
358
}
359
+
360
+ dependencies {
361
+ components { component ->
362
+ component. withModule(" org.jetbrains.kotlin:atomicfu" ) { ComponentMetadataDetails componentMetadataDetails ->
363
+ componentMetadataDetails. withVariant(" runtimeElements" ) { VariantMetadata runtimeElementsVariant ->
364
+ [KotlinJsCompilerAttribute . legacy, KotlinJsCompilerAttribute . ir]. forEach { jsType ->
365
+ componentMetadataDetails. addVariant(" runtimeJs${ jsType.name().capitalize()} Elements" ) { jsVariant ->
366
+ jsVariant. attributes {
367
+ it. attribute(KotlinPlatformType . attribute, KotlinPlatformType . js)
368
+ it. attribute(KotlinJsCompilerAttribute . jsCompilerAttribute, jsType)
369
+ it. attribute(Usage . USAGE_ATTRIBUTE , project. objects. named(Usage , Usage . JAVA_RUNTIME ))
370
+ }
371
+ runtimeElementsVariant. withFiles { DefaultMutableVariantFilesMetadata runtimeElementsFiles ->
372
+ jsVariant. withFiles {
373
+ runtimeElementsFiles. files. forEach { file ->
374
+ addFile(file. name)
375
+ }
376
+ }
377
+ }
378
+ }
379
+ }
380
+ }
381
+ }
382
+ }
383
+ }
384
384
}
0 commit comments