Skip to content

Commit 3780d67

Browse files
docs(app): make it clear what platform support is required (#8083)
* docs: make it clear what platform support is required * chore: helper warning for devs not using JVM 17 * ci: move test-patches CI to nodejs v20
1 parent 43ebcde commit 3780d67

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

.github/workflows/create_test_patches.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
# prior version (18.17.1) to see if it stabilizes
4040
- uses: actions/setup-node@v4
4141
with:
42-
node-version: 18.17.1
42+
node-version: 20
4343

4444
- uses: actions/cache/restore@v4
4545
name: Yarn Cache Restore

.spellcheck.dict.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ IPs
101101
isTesterSignedIn
102102
javascript
103103
Javascript
104+
JDK
104105
JS
105106
JSON
106107
lastDocument

docs/platforms.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@ next: /release-notes
88

99
By default React Native Firebase supports multiple platforms using the native Firebase SDK for the specific platform:
1010

11-
- Android
12-
- iOS
11+
| Platform | Minimum Version |
12+
| -------- | ------------------------------------ |
13+
| Android | 5.0 (Lollipop) without Firebase Auth |
14+
| | 6.0 (Marshmallow) with Firebase Auth |
15+
| iOS | 13.0 |
16+
17+
**Important** - To compile your application for Android, you will need a minimum JDK (Java Development Kit) version of `>= 17`.
1318

1419
However, for platforms that we don't provide a Native Module for, React Native Firebase instead implements a fallback Firebase JS SDK implementation to support
1520
these 'Other' platforms, e.g.;

packages/app/android/build.gradle

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import io.invertase.gradle.common.PackageJson
2+
import org.gradle.internal.jvm.Jvm
23

34
buildscript {
45
// The Android Gradle plugin is only required when opening the android folder stand-alone.
@@ -105,6 +106,22 @@ dependencies {
105106
implementation "com.google.android.gms:play-services-auth:${ReactNative.ext.getVersion("play", "play-services-auth")}"
106107
}
107108

109+
def jvmVersion = Jvm.current().javaVersion?.majorVersion
110+
// if it cannot get version, just allow it to pass. This is just a helper for developers
111+
if ((jvmVersion?.toInteger() ?: 17) < 17) {
112+
println("\n\n\n")
113+
println("**************************************************************************************************************")
114+
println("\n\n\n")
115+
println("ERROR: React Native Firebase builds with a minimum JVM version 17. We test with JVM 17 and 21.")
116+
println(" Incompatible major version detected: '" + jvmVersion + "'")
117+
println("\n\n\n")
118+
println(" If you receive this error because you want to use a different JDK, we may accept PRs to support new versions.")
119+
println("\n\n\n")
120+
println("**************************************************************************************************************")
121+
println("\n\n\n")
122+
System.exit(1)
123+
}
124+
108125
ReactNative.shared.applyPackageVersion()
109126
ReactNative.shared.applyDefaultExcludes()
110127
ReactNative.module.applyAndroidVersions()

0 commit comments

Comments
 (0)