Skip to content

Commit d2bc024

Browse files
cortinicofacebook-github-bot
authored andcommitted
Cleanup some of the dependencies inside ReactAndroid (facebook#34191)
Summary: This cleans up a bit our dependency list inside `ReactAndroid`. I've re-sorted the lists, and exported everything I could in the `gradle.properties`. I wish we could move to the Gradle Version Catalog for Android, but that's not possible at the moment (it will make impossible for users to build from source). ## Changelog [Internal] - Cleanup some of the dependencies inside ReactAndroid Pull Request resolved: facebook#34191 Test Plan: Will rely on a Green CircleCI Reviewed By: huntie Differential Revision: D37828614 Pulled By: cortinico fbshipit-source-id: f433d08d691db4145e0c72ca4dab2f0350e4101f
1 parent 753038c commit d2bc024

File tree

2 files changed

+37
-24
lines changed

2 files changed

+37
-24
lines changed

ReactAndroid/build.gradle

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -372,35 +372,38 @@ android {
372372
}
373373

374374
dependencies {
375-
api("com.facebook.infer.annotation:infer-annotation:0.18.0")
376-
api("com.facebook.yoga:proguard-annotations:1.19.0")
377-
api("javax.inject:javax.inject:1")
378-
api("androidx.appcompat:appcompat:${APPCOMPAT_VERSION}")
379-
api("androidx.appcompat:appcompat-resources:${APPCOMPAT_VERSION}")
380-
api("androidx.autofill:autofill:1.1.0")
381-
api("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
375+
api("androidx.appcompat:appcompat-resources:${ANDROIDX_APPCOMPAT_VERSION}")
376+
api("androidx.appcompat:appcompat:${ANDROIDX_APPCOMPAT_VERSION}")
377+
api("androidx.autofill:autofill:${ANDROIDX_AUTOFILL_VERSION}")
378+
api("androidx.swiperefreshlayout:swiperefreshlayout:${SWIPEREFRESH_LAYOUT_VERSION}")
379+
380+
api("com.facebook.fbjni:fbjni-java-only:${FBJNI_VERSION}")
382381
api("com.facebook.fresco:fresco:${FRESCO_VERSION}")
383382
api("com.facebook.fresco:imagepipeline-okhttp3:${FRESCO_VERSION}")
384383
api("com.facebook.fresco:ui-common:${FRESCO_VERSION}")
384+
api("com.facebook.infer.annotation:infer-annotation:${INFER_ANNOTATIONS_VERSION}")
385385
api("com.facebook.soloader:soloader:${SO_LOADER_VERSION}")
386-
api("com.google.code.findbugs:jsr305:3.0.2")
387-
api("com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}")
386+
api("com.facebook.yoga:proguard-annotations:${PROGUARD_ANNOTATIONS_VERSION}")
387+
388+
api("com.google.code.findbugs:jsr305:${JSR305_VERSION}")
388389
api("com.squareup.okhttp3:okhttp-urlconnection:${OKHTTP_VERSION}")
389-
api("com.squareup.okio:okio:2.9.0")
390-
api("com.facebook.fbjni:fbjni-java-only:0.2.2")
391-
extractHeaders("com.facebook.fbjni:fbjni:0.2.2:headers")
392-
extractJNI("com.facebook.fbjni:fbjni:0.2.2")
390+
api("com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}")
391+
api("com.squareup.okio:okio:${OKIO_VERSION}")
392+
api("javax.inject:javax.inject:${JAVAX_INJECT_VERSION}")
393+
394+
extractHeaders("com.facebook.fbjni:fbjni:${FBJNI_VERSION}:headers")
395+
extractJNI("com.facebook.fbjni:fbjni:${FBJNI_VERSION}")
393396

394397
// It's up to the consumer to decide if hermes should be included or not.
395398
// Therefore hermes-engine is a compileOnly dependency.
396399
compileOnly(project(":ReactAndroid:hermes-engine"))
397400

398401
testImplementation("junit:junit:${JUNIT_VERSION}")
402+
testImplementation("org.assertj:assertj-core:${ASSERTJ_VERSION}")
403+
testImplementation("org.mockito:mockito-core:${MOCKITO_CORE_VERSION}")
399404
testImplementation("org.powermock:powermock-api-mockito2:${POWERMOCK_VERSION}")
400-
testImplementation("org.powermock:powermock-module-junit4-rule:${POWERMOCK_VERSION}")
401405
testImplementation("org.powermock:powermock-classloading-xstream:${POWERMOCK_VERSION}")
402-
testImplementation("org.mockito:mockito-core:${MOCKITO_CORE_VERSION}")
403-
testImplementation("org.assertj:assertj-core:3.21.0")
406+
testImplementation("org.powermock:powermock-module-junit4-rule:${POWERMOCK_VERSION}")
404407
testImplementation("org.robolectric:robolectric:${ROBOLECTRIC_VERSION}")
405408

406409
androidTestImplementation(fileTree(dir: "src/main/third-party/java/buck-android-support/", include: ["*.jar"]))

ReactAndroid/gradle.properties

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,33 @@ POM_NAME=ReactNative
55
POM_ARTIFACT_ID=react-native
66
POM_PACKAGING=aar
77

8-
MOCKITO_CORE_VERSION=2.26.0
9-
POWERMOCK_VERSION=2.0.2
10-
ROBOLECTRIC_VERSION=4.4
11-
JUNIT_VERSION=4.12
12-
8+
# JVM Versions
9+
ASSERTJ_VERSION=3.21.0
1310
ANDROIDX_TEST_VERSION=1.1.0
14-
APPCOMPAT_VERSION=1.4.1
11+
ANDROIDX_APPCOMPAT_VERSION=1.4.1
12+
ANDROIDX_AUTOFILL_VERSION=1.1.0
13+
FBJNI_VERSION=0.2.2
1514
FRESCO_VERSION=2.5.0
15+
INFER_ANNOTATIONS_VERSION=0.18.0
16+
JAVAX_INJECT_VERSION=1
17+
JSR305_VERSION=3.0.2
18+
JUNIT_VERSION=4.12
19+
MOCKITO_CORE_VERSION=2.26.0
20+
OKIO_VERSION=2.9.0
1621
OKHTTP_VERSION=4.9.2
22+
POWERMOCK_VERSION=2.0.2
23+
PROGUARD_ANNOTATIONS_VERSION=1.19.0
24+
ROBOLECTRIC_VERSION=4.4
1725
SO_LOADER_VERSION=0.10.3
26+
SWIPEREFRESH_LAYOUT_VERSION=1.0.0
1827

28+
# Native Dependency Versions
1929
BOOST_VERSION=1_76_0
2030
DOUBLE_CONVERSION_VERSION=1.1.6
21-
FOLLY_VERSION=2021.07.22.00
2231
FMT_VERSION=6.2.1
23-
LIBEVENT_VERSION=2.1.12
32+
FOLLY_VERSION=2021.07.22.00
2433
GLOG_VERSION=0.3.5
34+
LIBEVENT_VERSION=2.1.12
2535

2636
android.useAndroidX=true
2737
android.enableJetifier=true

0 commit comments

Comments
 (0)