@@ -289,7 +289,7 @@ class DependencyUtilsTest {
289
289
val forcedModules = project.configurations.first().resolutionStrategy.forcedModules
290
290
assertThat(forcedModules.any { it.toString() == " com.facebook.react:react-android:1.2.3" })
291
291
.isTrue()
292
- assertThat(forcedModules.any { it.toString() == " com.facebook.react :hermes-android:4.5.6" })
292
+ assertThat(forcedModules.any { it.toString() == " com.facebook.hermes :hermes-android:4.5.6" })
293
293
.isTrue()
294
294
}
295
295
@@ -324,11 +324,11 @@ class DependencyUtilsTest {
324
324
val libForcedModules = libProject.configurations.first().resolutionStrategy.forcedModules
325
325
assertThat(appForcedModules.any { it.toString() == " com.facebook.react:react-android:1.2.3" })
326
326
.isTrue()
327
- assertThat(appForcedModules.any { it.toString() == " com.facebook.react :hermes-android:4.5.6" })
327
+ assertThat(appForcedModules.any { it.toString() == " com.facebook.hermes :hermes-android:4.5.6" })
328
328
.isTrue()
329
329
assertThat(libForcedModules.any { it.toString() == " com.facebook.react:react-android:1.2.3" })
330
330
.isTrue()
331
- assertThat(libForcedModules.any { it.toString() == " com.facebook.react :hermes-android:4.5.6" })
331
+ assertThat(libForcedModules.any { it.toString() == " com.facebook.hermes :hermes-android:4.5.6" })
332
332
.isTrue()
333
333
}
334
334
@@ -381,11 +381,15 @@ class DependencyUtilsTest {
381
381
val libForcedModules = libProject.configurations.first().resolutionStrategy.forcedModules
382
382
assertThat(appForcedModules.any { it.toString() == " io.github.test:react-android:1.2.3" })
383
383
.isTrue()
384
- assertThat(appForcedModules.any { it.toString() == " io.github.test:hermes-android:4.5.6" })
384
+ assertThat(
385
+ appForcedModules.any { it.toString() == " io.github.test.hermes:hermes-android:4.5.6" }
386
+ )
385
387
.isTrue()
386
388
assertThat(libForcedModules.any { it.toString() == " io.github.test:react-android:1.2.3" })
387
389
.isTrue()
388
- assertThat(libForcedModules.any { it.toString() == " io.github.test:hermes-android:4.5.6" })
390
+ assertThat(
391
+ libForcedModules.any { it.toString() == " io.github.test.hermes:hermes-android:4.5.6" }
392
+ )
389
393
.isTrue()
390
394
}
391
395
@@ -438,7 +442,7 @@ class DependencyUtilsTest {
438
442
)
439
443
.isEqualTo(dependencySubstitutions[0 ].third)
440
444
assertThat(" com.facebook.react:hermes-engine" ).isEqualTo(dependencySubstitutions[1 ].first)
441
- assertThat(" com.facebook.react :hermes-android:0.42.0" )
445
+ assertThat(" com.facebook.hermes :hermes-android:0.42.0" )
442
446
.isEqualTo(dependencySubstitutions[1 ].second)
443
447
assertThat(
444
448
" The hermes-engine artifact was deprecated in favor of hermes-android due to https://github.com/facebook/react-native/issues/35210."
@@ -490,19 +494,26 @@ class DependencyUtilsTest {
490
494
)
491
495
.isEqualTo(dependencySubstitutions[0 ].third)
492
496
assertThat(" com.facebook.react:hermes-engine" ).isEqualTo(dependencySubstitutions[1 ].first)
493
- assertThat(" io.github.test:hermes-android:0.42.0" ).isEqualTo(dependencySubstitutions[1 ].second)
497
+ assertThat(" io.github.test.hermes:hermes-android:0.42.0" )
498
+ .isEqualTo(dependencySubstitutions[1 ].second)
494
499
assertThat(
495
500
" The hermes-engine artifact was deprecated in favor of hermes-android due to https://github.com/facebook/react-native/issues/35210."
496
501
)
497
502
.isEqualTo(dependencySubstitutions[1 ].third)
498
- assertThat(" com.facebook.react:react-android" ).isEqualTo(dependencySubstitutions[2 ].first)
499
- assertThat(" io.github.test:react-android:0.42.0" ).isEqualTo(dependencySubstitutions[2 ].second)
500
- assertThat(" The react-android dependency was modified to use the correct Maven group." )
503
+ assertThat(" com.facebook.react:hermes-android" ).isEqualTo(dependencySubstitutions[2 ].first)
504
+ assertThat(" io.github.test.hermes:hermes-android:0.42.0" )
505
+ .isEqualTo(dependencySubstitutions[2 ].second)
506
+ assertThat(" The hermes-android artifact was moved to com.facebook.hermes publishing group." )
501
507
.isEqualTo(dependencySubstitutions[2 ].third)
502
- assertThat(" com.facebook.react:hermes -android" ).isEqualTo(dependencySubstitutions[3 ].first)
503
- assertThat(" io.github.test:hermes -android:0.42.0" ).isEqualTo(dependencySubstitutions[3 ].second)
504
- assertThat(" The hermes -android dependency was modified to use the correct Maven group." )
508
+ assertThat(" com.facebook.react:react -android" ).isEqualTo(dependencySubstitutions[3 ].first)
509
+ assertThat(" io.github.test:react -android:0.42.0" ).isEqualTo(dependencySubstitutions[3 ].second)
510
+ assertThat(" The react -android dependency was modified to use the correct Maven group." )
505
511
.isEqualTo(dependencySubstitutions[3 ].third)
512
+ assertThat(" com.facebook.react:hermes-android" ).isEqualTo(dependencySubstitutions[4 ].first)
513
+ assertThat(" io.github.test.hermes:hermes-android:0.42.0" )
514
+ .isEqualTo(dependencySubstitutions[4 ].second)
515
+ assertThat(" The hermes-android dependency was modified to use the correct Maven group." )
516
+ .isEqualTo(dependencySubstitutions[4 ].third)
506
517
}
507
518
508
519
@Test
@@ -532,15 +543,20 @@ class DependencyUtilsTest {
532
543
" The hermes-engine artifact was deprecated in favor of hermes-android due to https://github.com/facebook/react-native/issues/35210."
533
544
)
534
545
.isEqualTo(dependencySubstitutions[1 ].third)
535
- assertThat(" com.facebook.react:react-android" ).isEqualTo(dependencySubstitutions[2 ].first)
536
- assertThat(" io.github.test:react-android:0.42.0" ).isEqualTo(dependencySubstitutions[2 ].second)
537
- assertThat(" The react-android dependency was modified to use the correct Maven group." )
546
+ assertThat(" com.facebook.react:hermes-android" ).isEqualTo(dependencySubstitutions[2 ].first)
547
+ assertThat(" io.github.test.hermes:hermes-android:0.43.0" )
548
+ .isEqualTo(dependencySubstitutions[2 ].second)
549
+ assertThat(" The hermes-android artifact was moved to com.facebook.hermes publishing group." )
538
550
.isEqualTo(dependencySubstitutions[2 ].third)
539
- assertThat(" com.facebook.react:hermes-android" ).isEqualTo(dependencySubstitutions[3 ].first)
551
+ assertThat(" com.facebook.react:react-android" ).isEqualTo(dependencySubstitutions[3 ].first)
552
+ assertThat(" io.github.test:react-android:0.42.0" ).isEqualTo(dependencySubstitutions[3 ].second)
553
+ assertThat(" The react-android dependency was modified to use the correct Maven group." )
554
+ .isEqualTo(dependencySubstitutions[3 ].third)
555
+ assertThat(" com.facebook.react:hermes-android" ).isEqualTo(dependencySubstitutions[4 ].first)
540
556
assertThat(" io.github.test.hermes:hermes-android:0.43.0" )
541
- .isEqualTo(dependencySubstitutions[3 ].second)
557
+ .isEqualTo(dependencySubstitutions[4 ].second)
542
558
assertThat(" The hermes-android dependency was modified to use the correct Maven group." )
543
- .isEqualTo(dependencySubstitutions[3 ].third)
559
+ .isEqualTo(dependencySubstitutions[4 ].third)
544
560
}
545
561
546
562
@Test
@@ -560,6 +576,7 @@ class DependencyUtilsTest {
560
576
tempFolder.newFile(" version.properties" ).apply {
561
577
writeText(
562
578
"""
579
+ HERMES_VERSION_NAME=1000.0.0
563
580
HERMES_V1_VERSION_NAME=1000.0.0
564
581
ANOTHER_PROPERTY=true
565
582
"""
@@ -596,6 +613,7 @@ class DependencyUtilsTest {
596
613
tempFolder.newFile(" version.properties" ).apply {
597
614
writeText(
598
615
"""
616
+ HERMES_VERSION_NAME=0.14.0
599
617
HERMES_V1_VERSION_NAME=250829098.0.0-stable
600
618
ANOTHER_PROPERTY=true
601
619
"""
@@ -609,7 +627,7 @@ class DependencyUtilsTest {
609
627
val hermesV1VersionString = strings.hermesV1VersionString
610
628
611
629
assertThat(versionString).isEqualTo(" 0.0.0-20221101-2019-cfe811ab1-SNAPSHOT" )
612
- assertThat(hermesVersionString).isEqualTo(" 0.0.0-20221101-2019-cfe811ab1-SNAPSHOT " )
630
+ assertThat(hermesVersionString).isEqualTo(" 0.14.0 " )
613
631
assertThat(hermesV1VersionString).isEqualTo(" 250829098.0.0-stable" )
614
632
}
615
633
@@ -661,6 +679,7 @@ class DependencyUtilsTest {
661
679
tempFolder.newFile(" version.properties" ).apply {
662
680
writeText(
663
681
"""
682
+ HERMES_VERSION_NAME=
664
683
HERMES_V1_VERSION_NAME=
665
684
ANOTHER_PROPERTY=true
666
685
"""
@@ -695,6 +714,7 @@ class DependencyUtilsTest {
695
714
tempFolder.newFile(" version.properties" ).apply {
696
715
writeText(
697
716
"""
717
+ HERMES_VERSION_NAME=
698
718
HERMES_V1_VERSION_NAME=
699
719
ANOTHER_PROPERTY=true
700
720
"""
@@ -726,6 +746,7 @@ class DependencyUtilsTest {
726
746
tempFolder.newFile(" version.properties" ).apply {
727
747
writeText(
728
748
"""
749
+ HERMES_VERSION_NAME=
729
750
HERMES_V1_VERSION_NAME=
730
751
ANOTHER_PROPERTY=true
731
752
"""
0 commit comments