Skip to content

Commit bd9fbd7

Browse files
authored
chore: migrate mobile-crypto to BouncyCastle on Android (#7461)
1 parent 7b2a121 commit bd9fbd7

6 files changed

Lines changed: 21 additions & 8 deletions

File tree

.github/actions/build-android/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ runs:
4949
echo -e "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8" >> ./gradle.properties
5050
echo -e "android.useAndroidX=true" >> ./gradle.properties
5151
echo -e "android.enableJetifier=true" >> ./gradle.properties
52+
echo -e "android.jetifier.ignorelist=bcprov-jdk18on" >> ./gradle.properties
5253
echo -e "reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64" >> ./gradle.properties
5354
echo -e "newArchEnabled=true" >> ./gradle.properties
5455
echo -e "hermesEnabled=true" >> ./gradle.properties

.github/workflows/e2e-build-android.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ jobs:
101101
echo -e "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8" >> ./gradle.properties
102102
echo -e "android.useAndroidX=true" >> ./gradle.properties
103103
echo -e "android.enableJetifier=true" >> ./gradle.properties
104+
echo -e "android.jetifier.ignorelist=bcprov-jdk18on" >> ./gradle.properties
104105
echo -e "reactNativeArchitectures=arm64-v8a,x86_64" >> ./gradle.properties
105106
echo -e "APPLICATION_ID=chat.rocket.android" >> ./gradle.properties
106107
echo -e "newArchEnabled=true" >> ./gradle.properties

android/app/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,14 @@ android {
9595
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
9696
}
9797

98+
packaging {
99+
resources {
100+
// bcprov-jdk18on and its transitive jspecify both ship this OSGi bundle
101+
// manifest inside their multi-release jars; it is unused on Android.
102+
excludes += ["META-INF/versions/9/OSGI-INF/MANIFEST.MF"]
103+
}
104+
}
105+
98106
signingConfigs {
99107
release {
100108
v1SigningEnabled false

android/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8
2121
android.useAndroidX=true
2222
# Automatically convert third-party libraries to use AndroidX
2323
android.enableJetifier=true
24+
# Skip Jetifier for BouncyCastle: it is AndroidX-clean and ships Java 25 multi-release
25+
# classes that Jetifier's bundled ASM cannot parse (unsupported class file major version 69)
26+
android.jetifier.ignorelist=bcprov-jdk18on
2427

2528
# Use this property to specify which architecture you want to build.
2629
# You can also override it from the CLI using

ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ PODS:
248248
- MMKV (2.2.4):
249249
- MMKVCore (~> 2.2.4)
250250
- MMKVCore (2.2.4)
251-
- MobileCrypto (0.3.0):
251+
- MobileCrypto (0.4.0):
252252
- boost
253253
- DoubleConversion
254254
- fast_float
@@ -4023,7 +4023,7 @@ SPEC CHECKSUMS:
40234023
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
40244024
MMKV: 1a8e7dbce7f9cad02c52e1b1091d07bd843aefaf
40254025
MMKVCore: f2dd4c9befea04277a55e84e7812f930537993df
4026-
MobileCrypto: 382f541e04405f45c323b11a404d3cc4546d0669
4026+
MobileCrypto: cbe4be11a33b5888e77861de9346fa5d3fccc8ac
40274027
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
40284028
NitroMmkv: 4a2d747ce97a4ae740b3cb3a3853366813faf831
40294029
NitroModules: 18e41c298d86fc753fc754969fa9f84044e70711
@@ -4136,6 +4136,6 @@ SPEC CHECKSUMS:
41364136
Yoga: 1e91d83a5286cfd3b725eade59274c92270540d4
41374137
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5
41384138

4139-
PODFILE CHECKSUM: 4a928f36cea73defa438bb62e3a52a85a0b5f71a
4139+
PODFILE CHECKSUM: 9ef0d302aac0150cec49089c7c416db32bb9d3ec
41404140

41414141
COCOAPODS: 1.15.2

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)