Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: make it clear what platform support is required #8083

Merged
merged 6 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/create_test_patches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# prior version (18.17.1) to see if it stabilizes
- uses: actions/setup-node@v4
with:
node-version: 18.17.1
node-version: 20

- uses: actions/cache/restore@v4
name: Yarn Cache Restore
Expand Down
1 change: 1 addition & 0 deletions .spellcheck.dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ IPs
isTesterSignedIn
javascript
Javascript
JDK
JS
JSON
lastDocument
Expand Down
9 changes: 7 additions & 2 deletions docs/platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ next: /release-notes

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

- Android
- iOS
| Platform | Minimum Version |
| -------- | ------------------------------------ |
| Android | 5.0 (Lollipop) without Firebase Auth |
| | 6.0 (Marshmallow) with Firebase Auth |
| iOS | 13.0 |

**Important** - To compile your application for Android, you will need a minimum JDK (Java Development Kit) version of `>= 17`.
mikehardy marked this conversation as resolved.
Show resolved Hide resolved

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
these 'Other' platforms, e.g.;
Expand Down
17 changes: 17 additions & 0 deletions packages/app/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import io.invertase.gradle.common.PackageJson
import org.gradle.internal.jvm.Jvm

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

def jvmVersion = Jvm.current().javaVersion?.majorVersion
// if it cannot get version, just allow it to pass. This is just a helper for developers
if ((jvmVersion?.toInteger() ?: 17) < 17) {
mikehardy marked this conversation as resolved.
Show resolved Hide resolved
println("\n\n\n")
println("**************************************************************************************************************")
println("\n\n\n")
println("ERROR: React Native Firebase builds with a minimum JVM version 17. We test with JVM 17 and 21.")
println(" Incompatible major version detected: '" + jvmVersion + "'")
println("\n\n\n")
println(" If you receive this error because you want to use a different JDK, we may accept PRs to support new versions.")
println("\n\n\n")
println("**************************************************************************************************************")
println("\n\n\n")
System.exit(1)
}

ReactNative.shared.applyPackageVersion()
ReactNative.shared.applyDefaultExcludes()
ReactNative.module.applyAndroidVersions()
Expand Down
Loading